本文整理汇总了Java中org.omg.CORBA.portable.OutputStream.create_input_stream方法的典型用法代码示例。如果您正苦于以下问题:Java OutputStream.create_input_stream方法的具体用法?Java OutputStream.create_input_stream怎么用?Java OutputStream.create_input_stream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.portable.OutputStream
的用法示例。
在下文中一共展示了OutputStream.create_input_stream方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create_input_stream
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* returns an input stream that an Any value can be marshaled out of.
*
* @result the InputStream to marshal value of Any out of.
*/
public org.omg.CORBA.portable.InputStream create_input_stream()
{
//
// We create a new InputStream so that multiple threads can call here
// and read the streams in parallel without thread safety problems.
//
//debug.log ("create_input_stream");
if (AnyImpl.isStreamed[realType().kind().value()]) {
return stream.dup();
} else {
OutputStream os = (OutputStream)orb.create_output_stream();
TCUtility.marshalIn(os, realType(), value, object);
return os.create_input_stream();
}
}
示例2: StubIORImpl
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
public StubIORImpl( org.omg.CORBA.Object obj )
{
// write the IOR to an OutputStream and get an InputStream
OutputStream ostr = StubAdapter.getORB( obj ).create_output_stream();
ostr.write_Object(obj);
InputStream istr = ostr.create_input_stream();
// read the IOR components back from the stream
int typeLength = istr.read_long();
typeData = new byte[typeLength];
istr.read_octet_array(typeData, 0, typeLength);
int numProfiles = istr.read_long();
profileTags = new int[numProfiles];
profileData = new byte[numProfiles][];
for (int i = 0; i < numProfiles; i++) {
profileTags[i] = istr.read_long();
profileData[i] = new byte[istr.read_long()];
istr.read_octet_array(profileData[i], 0, profileData[i].length);
}
}
示例3: getDelegate
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
public Delegate getDelegate( ORB orb )
{
// write the IOR components to an org.omg.CORBA.portable.OutputStream
OutputStream ostr = orb.create_output_stream();
ostr.write_long(typeData.length);
ostr.write_octet_array(typeData, 0, typeData.length);
ostr.write_long(profileTags.length);
for (int i = 0; i < profileTags.length; i++) {
ostr.write_long(profileTags[i]);
ostr.write_long(profileData[i].length);
ostr.write_octet_array(profileData[i], 0, profileData[i].length);
}
InputStream istr = ostr.create_input_stream() ;
// read the IOR back from the stream
org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object();
return StubAdapter.getDelegate( obj ) ;
}
示例4: create_input_stream
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* returns an input stream that an Any value can be marshaled out of.
*
* @return the InputStream to marshal value of Any out of.
*/
public org.omg.CORBA.portable.InputStream create_input_stream()
{
//
// We create a new InputStream so that multiple threads can call here
// and read the streams in parallel without thread safety problems.
//
//debug.log ("create_input_stream");
if (AnyImpl.isStreamed[realType().kind().value()]) {
return stream.dup();
} else {
OutputStream os = (OutputStream)orb.create_output_stream();
TCUtility.marshalIn(os, realType(), value, object);
return os.create_input_stream();
}
}