本文整理汇总了Java中com.sun.corba.se.impl.encoding.EncapsInputStream类的典型用法代码示例。如果您正苦于以下问题:Java EncapsInputStream类的具体用法?Java EncapsInputStream怎么用?Java EncapsInputStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EncapsInputStream类属于com.sun.corba.se.impl.encoding包,在下文中一共展示了EncapsInputStream类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getExceptionDetailMessage
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
protected void getExceptionDetailMessage(
CorbaMessageMediator messageMediator,
ORBUtilSystemException wrapper)
{
ServiceContext sc = messageMediator.getReplyServiceContexts()
.get(ExceptionDetailMessage.value);
if (sc == null)
return ;
if (! (sc instanceof UnknownServiceContext)) {
throw wrapper.badExceptionDetailMessageServiceContextType();
}
byte[] data = ((UnknownServiceContext)sc).getData();
EncapsInputStream in =
EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
data, data.length);
in.consumeEndian();
String msg =
"----------BEGIN server-side stack trace----------\n"
+ in.read_wstring() + "\n"
+ "----------END server-side stack trace----------";
messageMediator.setReplyExceptionDetailMessage(msg);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:CorbaClientRequestDispatcherImpl.java
示例2: getIORFromString
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
/** This static method takes a Stringified IOR and converts it into IOR object.
* It is the caller's responsibility to only pass strings that start with "IOR:".
*/
private org.omg.CORBA.Object getIORFromString( String str )
{
// Length must be even for str to be valid
if ( (str.length() & 1) == 1 )
throw wrapper.badStringifiedIorLen() ;
byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE];
for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) {
buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0);
buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F);
}
EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length,
orb.getORBData().getGIOPVersion());
s.consumeEndian();
return s.read_Object() ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:INSURLOperationImpl.java
示例3: getExceptionDetailMessage
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
protected void getExceptionDetailMessage(
CorbaMessageMediator messageMediator,
ORBUtilSystemException wrapper)
{
ServiceContext sc = messageMediator.getReplyServiceContexts()
.get(ExceptionDetailMessage.value);
if (sc == null)
return ;
if (! (sc instanceof UnknownServiceContext)) {
throw wrapper.badExceptionDetailMessageServiceContextType();
}
byte[] data = ((UnknownServiceContext)sc).getData();
EncapsInputStream in =
new EncapsInputStream((ORB)messageMediator.getBroker(),
data, data.length);
in.consumeEndian();
String msg =
"----------BEGIN server-side stack trace----------\n"
+ in.read_wstring() + "\n"
+ "----------END server-side stack trace----------";
messageMediator.setReplyExceptionDetailMessage(msg);
}
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:26,代码来源:CorbaClientRequestDispatcherImpl.java
示例4: getIORFromString
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
/** This static method takes a Stringified IOR and converts it into IOR object.
* It is the caller's responsibility to only pass strings that start with "IOR:".
*/
private org.omg.CORBA.Object getIORFromString( String str )
{
// Length must be even for str to be valid
if ( (str.length() & 1) == 1 )
throw wrapper.badStringifiedIorLen() ;
byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE];
for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) {
buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0);
buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F);
}
EncapsInputStream s = new EncapsInputStream(orb, buf, buf.length,
orb.getORBData().getGIOPVersion());
s.consumeEndian();
return s.read_Object() ;
}
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:20,代码来源:INSURLOperationImpl.java
示例5: newEncapsInputStream
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
public static EncapsInputStream newEncapsInputStream(
final org.omg.CORBA.ORB orb, final byte[] buf, final int size,
final boolean littleEndian, final GIOPVersion version) {
return AccessController
.doPrivileged(new PrivilegedAction<EncapsInputStream>() {
@Override
public EncapsInputStream run() {
return new EncapsInputStream(orb, buf, size,
littleEndian, version);
}
});
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:EncapsInputStreamFactory.java
示例6: create_input_stream
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
public org.omg.CORBA.portable.InputStream create_input_stream() {
final org.omg.CORBA.portable.InputStream is = super
.create_input_stream();
AnyInputStream aIS = AccessController
.doPrivileged(new PrivilegedAction<AnyInputStream>() {
@Override
public AnyInputStream run() {
return new AnyInputStream(
(com.sun.corba.se.impl.encoding.EncapsInputStream) is);
}
});
return aIS;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:AnyImpl.java
示例7: getEncapsulationStream
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
/** Helper method to read the octet array from is, deencapsulate it,
* and return
* as another InputStream. This must be called inside the
* constructor of a derived class to obtain the correct stream
* for unmarshalling data.
*/
static public InputStream getEncapsulationStream( InputStream is )
{
byte[] data = readOctets( is ) ;
EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data,
data.length ) ;
result.consumeEndian() ;
return result ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:EncapsulationUtility.java
示例8: IIOPProfileImpl
import com.sun.corba.se.impl.encoding.EncapsInputStream; //导入依赖的package包/类
public IIOPProfileImpl( ORB orb, org.omg.IOP.TaggedProfile profile)
{
this( orb ) ;
if (profile == null || profile.tag != TAG_INTERNET_IOP.value ||
profile.profile_data == null) {
throw wrapper.invalidTaggedProfile() ;
}
EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data,
profile.profile_data.length);
istr.consumeEndian();
init( istr ) ;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:IIOPProfileImpl.java
注:本文中的com.sun.corba.se.impl.encoding.EncapsInputStream类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论