类 HessianSerializerOutput
- java.lang.Object
-
- com.alibaba.com.caucho.hessian.io.AbstractHessianOutput
-
- com.alibaba.com.caucho.hessian.io.HessianOutput
-
- com.alibaba.com.caucho.hessian.io.HessianSerializerOutput
-
public class HessianSerializerOutput extends HessianOutput
Output stream for Hessian requests.HessianOutput is unbuffered, so any client needs to provide its own buffering.
Serialization
OutputStream os = new FileOutputStream("test.xml"); HessianOutput out = new HessianSerializerOutput(os); out.writeObject(obj); os.close();
Writing an RPC Call
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.-
从类继承的方法 com.alibaba.com.caucho.hessian.io.HessianOutput
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, writeUTCDate
-
从类继承的方法 com.alibaba.com.caucho.hessian.io.AbstractHessianOutput
findSerializerFactory, getSerializerFactory, setSerializerFactory, writeClassFieldLength, writeObjectBegin, writeObjectEnd, writeReply
-
-
-
-
构造器详细资料
-
HessianSerializerOutput
public HessianSerializerOutput(OutputStream os)
Creates a new Hessian output stream, initialized with an underlying output stream.- 参数:
os
- the underlying output stream.
-
HessianSerializerOutput
public HessianSerializerOutput()
Creates an uninitialized Hessian output stream.
-
-
方法详细资料
-
writeObjectImpl
public void writeObjectImpl(Object obj) throws IOException
Applications which override this can do custom serialization.- 参数:
object
- the object to write.- 抛出:
IOException
-
-