Package com.caucho.hessian.io
Class HessianSerializerInput
java.lang.Object
com.caucho.hessian.io.AbstractHessianInput
com.caucho.hessian.io.Hessian2Input
com.caucho.hessian.io.HessianSerializerInput
- All Implemented Interfaces:
Hessian2Constants
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
-
Field Summary
Fields inherited from class com.caucho.hessian.io.Hessian2Input
_classDefs, _defaultSerializerFactory, _refs, _serializerFactory, _types
Fields inherited from interface com.caucho.hessian.io.Hessian2Constants
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 Summary
ConstructorsConstructorDescriptionCreates an uninitialized Hessian input stream.Creates a new Hessian input stream, initialized with an underlying input stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected HashMap
getFieldMap
(Class cl) Creates a map of the classes fields.protected Object
readObjectImpl
(Class cl) Reads an object from the input stream.Methods inherited from class com.caucho.hessian.io.Hessian2Input
addRef, close, codeName, completeCall, completeEnvelope, completeMessage, completeReply, completeValueReply, error, expect, findSerializerFactory, free, getMethod, getReader, getReplyFault, getSerializerFactory, init, initPacket, isCloseStreamOnClose, isEnd, read, readArguments, readBoolean, readByte, readBytes, readBytes, readCall, readChar, readDouble, readEnd, readEnvelope, readFloat, readHeader, readInputStream, readInt, readLength, readListEnd, readListStart, readLong, readMapEnd, readMapStart, readMethod, readMethodArgLength, readNull, readObject, readObject, readRef, readRemote, readReply, readShort, readStreamingObject, readString, readString, readType, readUTCDate, reset, resetBuffer, resetReferences, resolveRemote, setCloseStreamOnClose, setRef, setSerializerFactory, startCall, startMessage, startReply, unread
Methods inherited from class com.caucho.hessian.io.AbstractHessianInput
getRemoteResolver, readNode, readToOutputStream, setRemoteResolver, skipOptionalCall, startReplyBody
-
Constructor Details
-
HessianSerializerInput
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.
-
-
Method Details
-
readObjectImpl
Reads an object from the input stream. cl is known not to be a Map.- Throws:
IOException
-
getFieldMap
Creates a map of the classes fields.
-