本文整理汇总了Java中javax.rmi.CORBA.ValueHandlerMultiFormat.writeValue方法的典型用法代码示例。如果您正苦于以下问题:Java ValueHandlerMultiFormat.writeValue方法的具体用法?Java ValueHandlerMultiFormat.writeValue怎么用?Java ValueHandlerMultiFormat.writeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.rmi.CORBA.ValueHandlerMultiFormat
的用法示例。
在下文中一共展示了ValueHandlerMultiFormat.writeValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeArray
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入方法依赖的package包/类
private void writeArray(Serializable array, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(); //d11638
// Write value_tag
int indirection = writeValueTag(mustChunk, true,
Util.getCodebase(clazz));
// Write repository ID
write_repositoryId(repIdStrs.createSequenceRepID(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, array, array);
// Write Value chunk
if (mustChunk) {
start_block();
end_flag--;
chunkedValueNestingLevel--;
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, array, streamFormatVersion);
} else
valueHandler.writeValue(parent, array);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例2: writeArray
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入方法依赖的package包/类
private void writeArray(Serializable array, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(orb); //d11638
// Write value_tag
int indirection = writeValueTag(mustChunk, true,
Util.getCodebase(clazz));
// Write repository ID
write_repositoryId(repIdStrs.createSequenceRepID(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, array, array);
// Write Value chunk
if (mustChunk) {
start_block();
end_flag--;
chunkedValueNestingLevel--;
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, array, streamFormatVersion);
} else
valueHandler.writeValue(parent, array);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例3: writeRMIIIOPValueType
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入方法依赖的package包/类
private void writeRMIIIOPValueType(Serializable object, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(); //d11638
Serializable key = object;
// Allow the ValueHandler to call writeReplace on
// the Serializable (if the method is present)
object = valueHandler.writeReplace(key);
if (object == null) {
// Write null tag and return
write_long(0);
return;
}
if (object != key) {
if (valueCache != null && valueCache.containsKey(object)) {
writeIndirection(INDIRECTION_TAG, valueCache.getVal(object));
return;
}
clazz = object.getClass();
}
if (mustChunk || valueHandler.isCustomMarshaled(clazz)) {
mustChunk = true;
}
// Write value_tag
int indirection = writeValueTag(mustChunk, true, Util.getCodebase(clazz));
// Write rep. id
write_repositoryId(repIdStrs.createForJavaType(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, object, key);
if (mustChunk) {
// Write Value chunk
end_flag--;
chunkedValueNestingLevel--;
start_block();
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, object, streamFormatVersion);
} else
valueHandler.writeValue(parent, object);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}
示例4: writeRMIIIOPValueType
import javax.rmi.CORBA.ValueHandlerMultiFormat; //导入方法依赖的package包/类
private void writeRMIIIOPValueType(Serializable object, Class clazz) {
if (valueHandler == null)
valueHandler = ORBUtility.createValueHandler(orb); //d11638
Serializable key = object;
// Allow the ValueHandler to call writeReplace on
// the Serializable (if the method is present)
object = valueHandler.writeReplace(key);
if (object == null) {
// Write null tag and return
write_long(0);
return;
}
if (object != key) {
if (valueCache != null && valueCache.containsKey(object)) {
writeIndirection(INDIRECTION_TAG, valueCache.getVal(object));
return;
}
clazz = object.getClass();
}
if (mustChunk || valueHandler.isCustomMarshaled(clazz)) {
mustChunk = true;
}
// Write value_tag
int indirection = writeValueTag(mustChunk, true, Util.getCodebase(clazz));
// Write rep. id
write_repositoryId(repIdStrs.createForJavaType(clazz));
// Add indirection for object to indirection table
updateIndirectionTable(indirection, object, key);
if (mustChunk) {
// Write Value chunk
end_flag--;
chunkedValueNestingLevel--;
start_block();
} else
end_flag--;
if (valueHandler instanceof ValueHandlerMultiFormat) {
ValueHandlerMultiFormat vh = (ValueHandlerMultiFormat)valueHandler;
vh.writeValue(parent, object, streamFormatVersion);
} else
valueHandler.writeValue(parent, object);
if (mustChunk)
end_block();
// Write end tag
writeEndTag(mustChunk);
}