本文整理汇总了Java中org.omg.CORBA.portable.OutputStream.write_long方法的典型用法代码示例。如果您正苦于以下问题:Java OutputStream.write_long方法的具体用法?Java OutputStream.write_long怎么用?Java OutputStream.write_long使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.portable.OutputStream
的用法示例。
在下文中一共展示了OutputStream.write_long方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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 ) ;
}
示例2: initializeAnyFromComponents
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
protected boolean initializeAnyFromComponents() {
OutputStream out = any.create_output_stream();
// Writing the length first is the only difference to supers implementation
out.write_long(components.length);
for (int i=0; i<components.length; i++) {
if (components[i] instanceof DynAnyImpl) {
((DynAnyImpl)components[i]).writeAny(out);
} else {
// Not our implementation. Nothing we can do to prevent copying.
components[i].to_any().write_value(out);
}
}
any.read_value(out.create_input_stream(), any.type());
return true;
}
示例3: insertSystemException
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* Static method for writing a CORBA standard exception to an Any.
* @param any The Any to write the SystemException into.
*/
public static void insertSystemException(SystemException ex, Any any) {
OutputStream out = any.create_output_stream();
ORB orb = (ORB)(out.orb());
String name = ex.getClass().getName();
String repID = ORBUtility.repositoryIdOf(name);
out.write_string(repID);
out.write_long(ex.minor);
out.write_long(ex.completed.value());
any.read_value(out.create_input_stream(),
getSystemExceptionTypeCode(orb, repID, name));
}
示例4: writeSystemException
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* Static method for writing a CORBA standard exception to a stream.
* @param strm The OutputStream to use for marshaling.
*/
public static void writeSystemException(SystemException ex, OutputStream strm)
{
String s;
s = repositoryIdOf(ex.getClass().getName());
strm.write_string(s);
strm.write_long(ex.minor);
strm.write_long(ex.completed.value());
}
示例5: _write
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* Marshals the value in this <code>IntHolder</code> object's
* <code>value</code> field to the output stream <code>output</code>.
*
* @param output the <code>OutputStream</code> object that will contain
* the CDR formatted data
*/
public void _write(OutputStream output) {
output.write_long(value);
}
示例6: _write
import org.omg.CORBA.portable.OutputStream; //导入方法依赖的package包/类
/**
* Marshals the value in this {@code IntHolder} object's
* {@code value} field to the output stream {@code output}.
*
* @param output the {@code OutputStream} object that will contain
* the CDR formatted data
*/
public void _write(OutputStream output) {
output.write_long(value);
}