本文整理汇总了Java中org.omg.CORBA.portable.InputStream.read_Object方法的典型用法代码示例。如果您正苦于以下问题:Java InputStream.read_Object方法的具体用法?Java InputStream.read_Object怎么用?Java InputStream.read_Object使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.portable.InputStream
的用法示例。
在下文中一共展示了InputStream.read_Object方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolve
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
public org.omg.CORBA.Object resolve( String identifier )
{
InputStream inStream = null ;
org.omg.CORBA.Object result = null ;
try {
inStream = invoke( "get", identifier ) ;
result = inStream.read_Object();
// NOTE: do note trap and ignore errors.
// Let them flow out.
} finally {
bootstrapDelegate.releaseReply( null, inStream ) ;
}
return result ;
}
示例2: getDelegate
import org.omg.CORBA.portable.InputStream; //导入方法依赖的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 ) ;
}
示例3: readObjectAndNarrow
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
* Read an object reference from the input stream and narrow
* it to the desired type.
* @param in the stream to read from.
* @throws ClassCastException if narrowFrom cannot be cast to narrowTo.
*/
public static Object readObjectAndNarrow(InputStream in,
Class narrowTo)
throws ClassCastException
{
Object result = in.read_Object();
if (result != null)
return PortableRemoteObject.narrow(result, narrowTo);
else
return null;
}
示例4: _read
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
* Reads from <code>input</code> and initalizes the value in
* this <code>ObjectHolder</code> object
* with the unmarshalled data.
*
* @param input the InputStream containing CDR formatted data from the wire.
*/
public void _read(InputStream input) {
value = input.read_Object();
}
示例5: _read
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
* Reads from {@code input} and initalizes the value in
* this {@code ObjectHolder} object
* with the unmarshalled data.
*
* @param input the InputStream containing CDR formatted data from the wire.
*/
public void _read(InputStream input) {
value = input.read_Object();
}