public class HessianSerializerOutput extends Hessian2Output
HessianOutput is unbuffered, so any client needs to provide its own buffering.
OutputStream os = new FileOutputStream("test.xml"); HessianOutput out = new HessianSerializerOutput(os); out.writeObject(obj); os.close();
OutputStream os = ...; // from http connection HessianOutput out = new HessianSerializerOutput(os); String value; out.startCall("hello"); // start hello call out.writeString("arg1"); // write a string argument out.completeCall(); // complete the call
_os, SIZE
_serializerFactory
BC_BINARY, BC_BINARY_CHUNK, BC_BINARY_DIRECT, BC_BINARY_SHORT, BC_CLASS_DEF, BC_DATE, BC_DATE_MINUTE, BC_DOUBLE, BC_DOUBLE_BYTE, BC_DOUBLE_MILL, BC_DOUBLE_ONE, BC_DOUBLE_SHORT, BC_DOUBLE_ZERO, BC_END, BC_FALSE, BC_INT, BC_INT_BYTE_ZERO, BC_INT_SHORT_ZERO, BC_INT_ZERO, BC_LIST_DIRECT, BC_LIST_DIRECT_UNTYPED, BC_LIST_FIXED, BC_LIST_FIXED_UNTYPED, BC_LIST_VARIABLE, BC_LIST_VARIABLE_UNTYPED, BC_LONG, BC_LONG_BYTE_ZERO, BC_LONG_INT, BC_LONG_SHORT_ZERO, BC_LONG_ZERO, BC_MAP, BC_MAP_UNTYPED, BC_NULL, BC_OBJECT, BC_OBJECT_DEF, BC_OBJECT_DIRECT, BC_REF, BC_STRING, BC_STRING_CHUNK, BC_STRING_DIRECT, BC_STRING_SHORT, BC_TRUE, BINARY_DIRECT_MAX, BINARY_SHORT_MAX, INT_BYTE_MAX, INT_BYTE_MIN, INT_DIRECT_MAX, INT_DIRECT_MIN, INT_SHORT_MAX, INT_SHORT_MIN, LIST_DIRECT_MAX, LONG_BYTE_MAX, LONG_BYTE_MIN, LONG_DIRECT_MAX, LONG_DIRECT_MIN, LONG_SHORT_MAX, LONG_SHORT_MIN, OBJECT_DIRECT_MAX, P_PACKET, P_PACKET_CHUNK, P_PACKET_DIRECT, P_PACKET_SHORT, PACKET_DIRECT_MAX, PACKET_SHORT_MAX, STRING_DIRECT_MAX, STRING_SHORT_MAX
Constructor and Description |
---|
HessianSerializerOutput()
Creates an uninitialized Hessian output stream.
|
HessianSerializerOutput(java.io.OutputStream os)
Creates a new Hessian output stream, initialized with an
underlying output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
writeObjectImpl(java.lang.Object obj)
Applications which override this can do custom serialization.
|
addRef, call, close, completeCall, completeEnvelope, completeMessage, completeReply, endPacket, flush, flushBuffer, free, getBytesOutputStream, getRef, init, initPacket, isCloseStreamOnClose, printLenString, printString, printString, printString, removeRef, replaceRef, reset, resetReferences, setCloseStreamOnClose, setUnshared, startCall, startCall, startEnvelope, startMessage, startPacket, startReply, writeBoolean, writeByteBufferEnd, writeByteBufferPart, writeByteBufferStart, writeBytes, writeBytes, writeByteStream, writeClassFieldLength, writeDouble, writeFault, writeInt, writeListBegin, writeListEnd, writeLong, writeMapBegin, writeMapEnd, writeMethod, writeNull, writeObject, writeObjectBegin, writeObjectEnd, writeRef, writeStreamingObject, writeString, writeString, writeUTCDate, writeVersion
findSerializerFactory, getSerializerFactory, setSerializerFactory, writeHeader, writeReply
public HessianSerializerOutput(java.io.OutputStream os)
os
- the underlying output stream.public HessianSerializerOutput()