本文整理汇总了Java中org.omg.CORBA.portable.InputStream.read_long方法的典型用法代码示例。如果您正苦于以下问题:Java InputStream.read_long方法的具体用法?Java InputStream.read_long怎么用?Java InputStream.read_long使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.portable.InputStream
的用法示例。
在下文中一共展示了InputStream.read_long方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: list
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
public java.util.Set list()
{
InputStream inStream = null ;
java.util.Set result = new java.util.HashSet() ;
try {
inStream = invoke( "list", null ) ;
int count = inStream.read_long();
for (int i=0; i < count; i++)
result.add( inStream.read_string() ) ;
// NOTE: do note trap and ignore errors.
// Let them flow out.
} finally {
bootstrapDelegate.releaseReply( null, inStream ) ;
}
return result ;
}
示例2: StubIORImpl
import org.omg.CORBA.portable.InputStream; //导入方法依赖的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: initializeComponentsFromAny
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
protected boolean initializeComponentsFromAny() {
// This typeCode is of kind tk_sequence.
TypeCode typeCode = any.type();
int length;
TypeCode contentType = getContentType();
InputStream input;
try {
input = any.create_input_stream();
} catch (BAD_OPERATION e) {
return false;
}
length = input.read_long();
components = new DynAny[length];
anys = new Any[length];
for (int i=0; i<length; i++) {
// _REVISIT_ Could use read_xxx_array() methods on InputStream for efficiency
// but only for primitive types
anys[i] = DynAnyUtil.extractAnyFromStream(contentType, input, orb);
try {
// Creates the appropriate subtype without copying the Any
components[i] = DynAnyUtil.createMostDerivedDynAny(anys[i], orb, false);
} catch (InconsistentTypeCode itc) { // impossible
}
}
return true;
}
示例4: _read
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
* Reads unmarshalled data from <code>input</code> and assigns it to
* the <code>value</code> field in this <code>IntHolder</code> object.
*
* @param input the <code>InputStream</code> object containing CDR
* formatted data from the wire
*/
public void _read(InputStream input) {
value = input.read_long();
}
示例5: _read
import org.omg.CORBA.portable.InputStream; //导入方法依赖的package包/类
/**
* Reads unmarshalled data from {@code input} and assigns it to
* the {@code value} field in this {@code IntHolder} object.
*
* @param input the {@code InputStream} object containing CDR
* formatted data from the wire
*/
public void _read(InputStream input) {
value = input.read_long();
}