public abstract class AbstractHessianInput extends Object
AbstractHessianInput in = ...; // get input String value; in.startReply(); // read reply header value = in.readString(); // read string value in.completeReply(); // read reply footer
| Constructor and Description |
|---|
AbstractHessianInput() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
addRef(Object obj)
Adds an object reference.
|
void |
close() |
abstract void |
completeCall()
Completes reading the call
|
abstract void |
completeReply()
Completes reading the call
|
abstract String |
getMethod()
Returns the call's method
|
abstract Reader |
getReader()
Starts reading a string.
|
HessianRemoteResolver |
getRemoteResolver()
Sets the resolver used to lookup remote objects.
|
void |
init(InputStream is)
Initialize the Hessian stream with the underlying input stream.
|
abstract boolean |
isEnd()
Returns true if the data has ended.
|
abstract boolean |
readBoolean()
Reads a boolean
|
abstract byte[] |
readBytes()
Reads a byte array.
|
abstract int |
readCall()
Reads the call
|
abstract double |
readDouble()
Reads a double.
|
abstract void |
readEnd()
Read the end byte
|
abstract String |
readHeader()
Reads a header, returning null if there are no headers.
|
abstract InputStream |
readInputStream()
Starts reading a byte array using an input stream.
|
abstract int |
readInt()
Reads an integer
|
abstract int |
readLength()
Reads the length of a list.
|
abstract void |
readListEnd()
Read the end byte
|
abstract int |
readListStart()
Reads the start of a list
|
abstract long |
readLong()
Reads a long
|
abstract void |
readMapEnd()
Read the end byte
|
abstract int |
readMapStart()
Reads the start of a map
|
abstract String |
readMethod()
Starts reading the call
|
int |
readMethodArgLength()
Reads the number of method arguments
|
Node |
readNode()
Reads an XML node encoded in UTF-8
|
abstract void |
readNull()
Reads a null
|
abstract Object |
readObject()
Reads an arbitrary object from the input stream.
|
abstract Object |
readObject(Class expectedClass)
Reads an arbitrary object from the input stream.
|
abstract Object |
readRef()
Reads a reference
|
abstract Object |
readRemote()
Reads a remote object reference to the stream.
|
abstract Object |
readReply(Class expectedClass)
Reads a reply as an object.
|
abstract String |
readString()
Reads a string encoded in UTF-8
|
boolean |
readToOutputStream(OutputStream os)
Reads data to an output stream.
|
abstract String |
readType()
Reads an object type.
|
abstract long |
readUTCDate()
Reads a date.
|
void |
resetReferences()
Resets the references for streaming.
|
abstract void |
setRef(int i,
Object obj)
Sets an object reference.
|
void |
setRemoteResolver(HessianRemoteResolver resolver)
Sets the resolver used to lookup remote objects.
|
void |
setSerializerFactory(SerializerFactory ser)
Sets the serializer factory.
|
void |
skipOptionalCall()
For backward compatibility with HessianSkeleton
|
abstract void |
startCall()
Starts reading the call, including the headers.
|
abstract void |
startReply()
Starts reading the reply
|
void |
startReplyBody()
Starts reading the body of the reply, i.e.
|
public void init(InputStream is)
public abstract String getMethod()
public void setRemoteResolver(HessianRemoteResolver resolver)
public HessianRemoteResolver getRemoteResolver()
public void setSerializerFactory(SerializerFactory ser)
public abstract int readCall()
throws IOException
c major minor
IOExceptionpublic void skipOptionalCall()
throws IOException
IOExceptionpublic abstract String readHeader() throws IOException
H b16 b8 value
IOExceptionpublic abstract String readMethod() throws IOException
A successful completion will have a single value:
m b16 b8 method
IOExceptionpublic int readMethodArgLength()
throws IOException
IOExceptionpublic abstract void startCall()
throws IOException
The call expects the following protocol data
c major minor m b16 b8 method
IOExceptionpublic abstract void completeCall()
throws IOException
The call expects the following protocol data
Z
IOExceptionpublic abstract Object readReply(Class expectedClass) throws Throwable
Throwablepublic abstract void startReply()
throws Throwable
A successful completion will have a single value:
r v
Throwablepublic void startReplyBody()
throws Throwable
Throwablepublic abstract void completeReply()
throws IOException
A successful completion will have a single value:
z
IOExceptionpublic abstract boolean readBoolean()
throws IOException
T F
IOExceptionpublic abstract void readNull()
throws IOException
N
IOExceptionpublic abstract int readInt()
throws IOException
I b32 b24 b16 b8
IOExceptionpublic abstract long readLong()
throws IOException
L b64 b56 b48 b40 b32 b24 b16 b8
IOExceptionpublic abstract double readDouble()
throws IOException
D b64 b56 b48 b40 b32 b24 b16 b8
IOExceptionpublic abstract long readUTCDate()
throws IOException
T b64 b56 b48 b40 b32 b24 b16 b8
IOExceptionpublic abstract String readString() throws IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
IOExceptionpublic Node readNode() throws IOException
x b16 b8 non-final xml chunk X b16 b8 final xml chunk
IOExceptionpublic abstract Reader getReader() throws IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
IOExceptionpublic abstract InputStream readInputStream() throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOExceptionpublic boolean readToOutputStream(OutputStream os) throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOExceptionpublic abstract byte[] readBytes()
throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOExceptionpublic abstract Object readObject(Class expectedClass) throws IOException
expectedClass - the expected class if the protocol doesn't supply it.IOExceptionpublic abstract Object readObject() throws IOException
IOExceptionpublic abstract Object readRemote() throws IOException
'r' 't' b16 b8 type url
IOExceptionpublic abstract Object readRef() throws IOException
R b32 b24 b16 b8
IOExceptionpublic abstract int addRef(Object obj) throws IOException
IOExceptionpublic abstract void setRef(int i,
Object obj)
throws IOException
IOExceptionpublic void resetReferences()
public abstract int readListStart()
throws IOException
IOExceptionpublic abstract int readLength()
throws IOException
IOExceptionpublic abstract int readMapStart()
throws IOException
IOExceptionpublic abstract String readType() throws IOException
IOExceptionpublic abstract boolean isEnd()
throws IOException
IOExceptionpublic abstract void readEnd()
throws IOException
IOExceptionpublic abstract void readMapEnd()
throws IOException
IOExceptionpublic abstract void readListEnd()
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2017 Caucho Technology, Inc. All rights reserved.