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
IOException
public void skipOptionalCall() throws IOException
IOException
public abstract String readHeader() throws IOException
H b16 b8 value
IOException
public abstract String readMethod() throws IOException
A successful completion will have a single value:
m b16 b8 method
IOException
public int readMethodArgLength() throws IOException
IOException
public abstract void startCall() throws IOException
The call expects the following protocol data
c major minor m b16 b8 method
IOException
public abstract void completeCall() throws IOException
The call expects the following protocol data
Z
IOException
public abstract Object readReply(Class expectedClass) throws Throwable
Throwable
public abstract void startReply() throws Throwable
A successful completion will have a single value:
r v
Throwable
public void startReplyBody() throws Throwable
Throwable
public abstract void completeReply() throws IOException
A successful completion will have a single value:
z
IOException
public abstract boolean readBoolean() throws IOException
T F
IOException
public abstract void readNull() throws IOException
N
IOException
public abstract int readInt() throws IOException
I b32 b24 b16 b8
IOException
public abstract long readLong() throws IOException
L b64 b56 b48 b40 b32 b24 b16 b8
IOException
public abstract double readDouble() throws IOException
D b64 b56 b48 b40 b32 b24 b16 b8
IOException
public abstract long readUTCDate() throws IOException
T b64 b56 b48 b40 b32 b24 b16 b8
IOException
public abstract String readString() throws IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
IOException
public Node readNode() throws IOException
x b16 b8 non-final xml chunk X b16 b8 final xml chunk
IOException
public abstract Reader getReader() throws IOException
s b16 b8 non-final string chunk S b16 b8 final string chunk
IOException
public abstract InputStream readInputStream() throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOException
public boolean readToOutputStream(OutputStream os) throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOException
public abstract byte[] readBytes() throws IOException
b b16 b8 non-final binary chunk B b16 b8 final binary chunk
IOException
public abstract Object readObject(Class expectedClass) throws IOException
expectedClass
- the expected class if the protocol doesn't supply it.IOException
public abstract Object readObject() throws IOException
IOException
public abstract Object readRemote() throws IOException
'r' 't' b16 b8 type url
IOException
public abstract Object readRef() throws IOException
R b32 b24 b16 b8
IOException
public abstract int addRef(Object obj) throws IOException
IOException
public abstract void setRef(int i, Object obj) throws IOException
IOException
public void resetReferences()
public abstract int readListStart() throws IOException
IOException
public abstract int readLength() throws IOException
IOException
public abstract int readMapStart() throws IOException
IOException
public abstract String readType() throws IOException
IOException
public abstract boolean isEnd() throws IOException
IOException
public abstract void readEnd() throws IOException
IOException
public abstract void readMapEnd() throws IOException
IOException
public abstract void readListEnd() throws IOException
IOException
public void close() throws IOException
IOException
Copyright © 2023. All rights reserved.