com.caucho.hessian.io
Class HessianSerializerInput
java.lang.Object
com.caucho.hessian.io.AbstractHessianInput
com.caucho.hessian.io.HessianInput
com.caucho.hessian.io.HessianSerializerInput
public class HessianSerializerInput
- extends HessianInput
Input stream for Hessian requests, deserializing objects using the
java.io.Serialization protocol.
HessianSerializerInput is unbuffered, so any client needs to provide
its own buffering.
Serialization
InputStream is = new FileInputStream("test.xml");
HessianOutput in = new HessianSerializerOutput(is);
Object obj = in.readObject();
is.close();
Parsing a Hessian reply
InputStream is = ...; // from http connection
HessianInput in = new HessianSerializerInput(is);
String value;
in.startReply(); // read reply header
value = in.readString(); // read string value
in.completeReply(); // read reply footer
Method Summary |
protected java.util.HashMap |
getFieldMap(java.lang.Class cl)
Creates a map of the classes fields. |
protected java.lang.Object |
readObjectImpl(java.lang.Class cl)
Reads an object from the input stream. |
Methods inherited from class com.caucho.hessian.io.HessianInput |
addRef, close, completeCall, completeReply, completeValueReply, error, expect, getMethod, getReader, getReplyFault, getSerializerFactory, init, isEnd, parseXML, read, read, readBoolean, readByte, readBytes, readBytes, readCall, readChar, readDouble, readEnd, readFloat, readHeader, readInputStream, readInt, readLength, readListEnd, readListStart, readLong, readMapEnd, readMapStart, readMethod, readNode, readNull, readObject, readObject, readRef, readRemote, readReply, readShort, readString, readString, readType, readUTCDate, resetReferences, resolveRemote, setRef, setSerializerFactory, skipOptionalCall, startCall, startReply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HessianSerializerInput
public HessianSerializerInput(java.io.InputStream is)
- Creates a new Hessian input stream, initialized with an
underlying input stream.
- Parameters:
is
- the underlying input stream.
HessianSerializerInput
public HessianSerializerInput()
- Creates an uninitialized Hessian input stream.
readObjectImpl
protected java.lang.Object readObjectImpl(java.lang.Class cl)
throws java.io.IOException
- Reads an object from the input stream. cl is known not to be
a Map.
- Throws:
java.io.IOException
getFieldMap
protected java.util.HashMap getFieldMap(java.lang.Class cl)
- Creates a map of the classes fields.