本文整理汇总了Java中com.sun.corba.se.impl.encoding.EncapsInputStream.consumeEndian方法的典型用法代码示例。如果您正苦于以下问题:Java EncapsInputStream.consumeEndian方法的具体用法?Java EncapsInputStream.consumeEndian怎么用?Java EncapsInputStream.consumeEndian使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.corba.se.impl.encoding.EncapsInputStream
的用法示例。
在下文中一共展示了EncapsInputStream.consumeEndian方法的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);
}
示例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() ;
}
示例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);
}
示例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() ;
}
示例5: 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 ;
}
示例6: 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 ) ;
}
示例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 = new EncapsInputStream( is.orb(), data,
data.length ) ;
result.consumeEndian() ;
return result ;
}
示例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 = new EncapsInputStream((ORB)orb, profile.profile_data,
profile.profile_data.length);
istr.consumeEndian();
init( istr ) ;
}