public class HessianSerializerOutput extends HessianOutput
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
| 构造器和说明 |
|---|
HessianSerializerOutput()
Creates an uninitialized Hessian output stream.
|
HessianSerializerOutput(OutputStream os)
Creates a new Hessian output stream, initialized with an
underlying output stream.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
writeObjectImpl(Object obj)
Applications which override this can do custom serialization.
|
addRef, call, close, completeCall, completeReply, flush, init, printLenString, printString, printString, printString, removeRef, replaceRef, resetReferences, setVersion, startCall, startCall, startReply, writeBoolean, writeByteBufferEnd, writeByteBufferPart, writeByteBufferStart, writeBytes, writeBytes, writeDouble, writeFault, writeHeader, writeInt, writeListBegin, writeListEnd, writeLong, writeMapBegin, writeMapEnd, writeMethod, writeNull, writeObject, writePlaceholder, writeRef, writeRemote, writeString, writeString, writeUTCDatefindSerializerFactory, getSerializerFactory, setSerializerFactory, writeClassFieldLength, writeObjectBegin, writeObjectEnd, writeReplypublic HessianSerializerOutput(OutputStream os)
os - the underlying output stream.public HessianSerializerOutput()
public void writeObjectImpl(Object obj) throws IOException
object - the object to write.IOExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.