本文整理汇总了Java中javax.rmi.CORBA.Util.writeAbstractObject方法的典型用法代码示例。如果您正苦于以下问题:Java Util.writeAbstractObject方法的具体用法?Java Util.writeAbstractObject怎么用?Java Util.writeAbstractObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.rmi.CORBA.Util
的用法示例。
在下文中一共展示了Util.writeAbstractObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeObjectOverride
import javax.rmi.CORBA.Util; //导入方法依赖的package包/类
/**
* Override the actions of the final method "writeObject()"
* in ObjectOutputStream.
* @since JDK1.1.6
*/
public final void writeObjectOverride(Object obj)
throws IOException
{
writeObjectState.writeData(this);
Util.writeAbstractObject((OutputStream)orbStream, obj);
}
示例2: writeObjectOverride
import javax.rmi.CORBA.Util; //导入方法依赖的package包/类
/**
* Override the actions of the final method "writeObject()"
* in ObjectOutputStream.
* @since JDK1.1.6
*/
public final void writeObjectOverride(Object obj)
throws IOException
{
writeObjectState.writeData(this);
Util.writeAbstractObject((OutputStream)orbStream, obj);
}
示例3: write
import javax.rmi.CORBA.Util; //导入方法依赖的package包/类
public void write( OutputStream os, Object value )
{
Util.writeAbstractObject( os, value ) ;
}
示例4: writeObjectField
import javax.rmi.CORBA.Util; //导入方法依赖的package包/类
private void writeObjectField(ObjectStreamField field,
Object objectValue) throws IOException {
if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
}
else {
Class type = field.getType();
int callType = ValueHandlerImpl.kValueType;
if (type.isInterface()) {
String className = type.getName();
if (java.rmi.Remote.class.isAssignableFrom(type)) {
// RMI Object reference...
callType = ValueHandlerImpl.kRemoteType;
} else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){
// IDL Object reference...
callType = ValueHandlerImpl.kRemoteType;
} else if (RepositoryId.isAbstractBase(type)) {
// IDL Abstract Object reference...
callType = ValueHandlerImpl.kAbstractType;
} else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
callType = ValueHandlerImpl.kAbstractType;
}
}
switch (callType) {
case ValueHandlerImpl.kRemoteType:
Util.writeRemoteObject(orbStream, objectValue);
break;
case ValueHandlerImpl.kAbstractType:
Util.writeAbstractObject(orbStream, objectValue);
break;
case ValueHandlerImpl.kValueType:
try{
orbStream.write_value((java.io.Serializable)objectValue, type);
}
catch(ClassCastException cce){
if (objectValue instanceof java.io.Serializable)
throw cce;
else
Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
}
}
}
}
示例5: writeObjectField
import javax.rmi.CORBA.Util; //导入方法依赖的package包/类
private void writeObjectField(ObjectStreamField field,
Object objectValue) throws IOException {
if (ObjectStreamClassCorbaExt.isAny(field.getTypeString())) {
javax.rmi.CORBA.Util.writeAny(orbStream, objectValue);
}
else {
Class type = field.getType();
int callType = ValueHandlerImpl.kValueType;
if (type.isInterface()) {
String className = type.getName();
if (java.rmi.Remote.class.isAssignableFrom(type)) {
// RMI Object reference...
callType = ValueHandlerImpl.kRemoteType;
} else if (org.omg.CORBA.Object.class.isAssignableFrom(type)){
// IDL Object reference...
callType = ValueHandlerImpl.kRemoteType;
} else if (RepositoryId.isAbstractBase(type)) {
// IDL Abstract Object reference...
callType = ValueHandlerImpl.kAbstractType;
} else if (ObjectStreamClassCorbaExt.isAbstractInterface(type)) {
callType = ValueHandlerImpl.kAbstractType;
}
}
switch (callType) {
case ValueHandlerImpl.kRemoteType:
Util.writeRemoteObject(orbStream, objectValue);
break;
case ValueHandlerImpl.kAbstractType:
Util.writeAbstractObject(orbStream, objectValue);
break;
case ValueHandlerImpl.kValueType:
try{
orbStream.write_value((java.io.Serializable)objectValue, type);
}
catch(ClassCastException cce){
if (objectValue instanceof java.io.Serializable)
throw cce;
else
Utility.throwNotSerializableForCorba(objectValue.getClass().getName());
}
}
}
}