本文整理汇总了Java中org.omg.CORBA.Any.create_output_stream方法的典型用法代码示例。如果您正苦于以下问题:Java Any.create_output_stream方法的具体用法?Java Any.create_output_stream怎么用?Java Any.create_output_stream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.omg.CORBA.Any
的用法示例。
在下文中一共展示了Any.create_output_stream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: extractAny
import org.omg.CORBA.Any; //导入方法依赖的package包/类
public Any extractAny(TypeCode memberType, ORB orb) {
Any returnValue = orb.create_any();
OutputStream out = returnValue.create_output_stream();
TypeCodeImpl.convertToNative(orb, memberType).copy((InputStream)stream, out);
returnValue.read_value(out.create_input_stream(), memberType);
return returnValue;
}
示例2: extractAnyFromStream
import org.omg.CORBA.Any; //导入方法依赖的package包/类
static public Any extractAnyFromStream(TypeCode memberType, InputStream input, ORB orb) {
Any returnValue = orb.create_any();
OutputStream out = returnValue.create_output_stream();
TypeCodeImpl.convertToNative(orb, memberType).copy(input, out);
returnValue.read_value(out.create_input_stream(), memberType);
return returnValue;
}
示例3: insertSystemException
import org.omg.CORBA.Any; //导入方法依赖的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));
}