| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectcom.caucho.hessian.io.AbstractHessianInputcom.caucho.hessian.io.HessianInputpublic class HessianInputextends AbstractHessianInputInputStream is = ...; // from http connection HessianInput in = new HessianInput(is); String value; in.startReply(); // read reply header value = in.readString(); // read string value in.completeReply(); // read reply footer
Field Summary | |
private static int | |
private InputStream | |
private int | |
private Reader | |
private static Field | |
private InputStream | |
private boolean | |
private String | |
protected int | |
protected ArrayList | |
private Throwable | |
protected SerializerFactory | |
Fields inherited from class com.caucho.hessian.io.AbstractHessianInput | |
resolver | |
Constructor Summary | |
| |
| |
Method Summary | |
int |
|
void |
|
void |
|
void |
|
protected IOException |
|
protected IOException |
|
String |
|
Reader |
|
Throwable |
|
SerializerFactory |
|
void |
|
boolean |
|
private int |
|
private int |
|
private double |
|
private int |
|
private long |
|
private int |
|
(package private) org.w3c.dom.Node |
|
private Throwable |
|
(package private) int |
|
(package private) int |
|
boolean |
|
int |
|
byte[] |
|
int |
|
int |
|
int |
|
double |
|
void |
|
private HashMap |
|
float |
|
String |
|
InputStream |
|
int |
|
int |
|
void |
|
int |
|
long |
|
void |
|
int |
|
String |
|
org.w3c.dom.Node |
|
void |
|
Object |
|
Object |
|
Object |
|
Object |
|
Object |
|
short |
|
String |
|
int |
|
String |
|
long |
|
Object |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class com.caucho.hessian.io.AbstractHessianInput | |
addRef, completeCall, completeReply, getMethod, getReader, getRemoteResolver, init, isEnd, readBoolean, readBytes, readDouble, readEnd, readInputStream, readInt, readLength, readListEnd, readListStart, readLong, readMapEnd, readMapStart, readNode, readNull, readObject, readObject, readRef, readRemote, readReply, readString, readType, readUTCDate, setRef, setRemoteResolver, startCall, startReply | |
private static int END_OF_DATA
private InputStream _chunkInputStream
private int _chunkLength
private Reader _chunkReader
private static Field _detailMessageField
private InputStream _is
private boolean _isLastChunk
private String _method
protected int _peek
protected ArrayList _refs
private Throwable _replyFault
public HessianInput()
Creates an uninitialized Hessian input stream.
public HessianInput(InputStream is)
Creates a new Hessian input stream, initialized with an underlying input stream.
- Parameters:
is- the underlying input stream.
public int addRef(Object ref)
Adds a list/map reference.
- Overrides:
- addRef in interface AbstractHessianInput
public void completeCall()
throws IOExceptionCompletes reading the call A successful completion will have a single value:z
- Overrides:
- completeCall in interface AbstractHessianInput
public void completeReply()
throws IOExceptionCompletes reading the call A successful completion will have a single value:z
- Overrides:
- completeReply in interface AbstractHessianInput
public void completeValueReply()
throws IOExceptionCompletes reading the call A successful completion will have a single value:z
protected IOException error(String message)
protected IOException expect(String expect,
int ch)public String getMethod()
Returns the calls method
- Overrides:
- getMethod in interface AbstractHessianInput
public Reader getReader()
Starts reading a string. All the characters must be read before calling the next method. The actual characters will be read with the reader's read() or read(char [], int, int).s b16 b8 non-final string chunk S b16 b8 final string chunk
- Overrides:
- getReader in interface AbstractHessianInput
public Throwable getReplyFault()
Returns any reply fault.
public void init(InputStream is)
Initialize the hessian stream with the underlying input stream.
- Overrides:
- init in interface AbstractHessianInput
public boolean isEnd()
throws IOExceptionReturns true if this is the end of a list or a map.
- Overrides:
- isEnd in interface AbstractHessianInput
private int parseByte()
throws IOExceptionReads a byte from the underlying stream.
private int parseChar()
throws IOExceptionReads a character from the underlying stream.
private double parseDouble()
throws IOExceptionParses a 64-bit double value from the stream.b64 b56 b48 b40 b32 b24 b16 b8
private int parseInt()
throws IOExceptionParses a 32-bit integer value from the stream.b32 b24 b16 b8
private long parseLong()
throws IOExceptionParses a 64-bit long value from the stream.b64 b56 b48 b40 b32 b24 b16 b8
private int parseUTF8Char()
throws IOExceptionParses a single UTF8 character.
(package private) org.w3c.dom.Node parseXML()
throws IOExceptionprivate Throwable prepareFault()
throws IOExceptionPrepares the fault.
(package private) final int read()
throws IOException(package private) int read(byte[] buffer,
int offset,
int length)
throws IOExceptionReads bytes from the underlying stream.
public boolean readBoolean()
throws IOExceptionReads a booleanT F
- Overrides:
- readBoolean in interface AbstractHessianInput
public int readByte()
throws IOExceptionReads a byte from the stream.
public byte[] readBytes()
throws IOExceptionReads a byte arrayB b16 b8 data value
- Overrides:
- readBytes in interface AbstractHessianInput
public int readBytes(byte[] buffer,
int offset,
int length)
throws IOExceptionReads a byte array from the stream.
public int readCall()
throws IOExceptionStarts reading the callc major minor
public int readChar()
throws IOExceptionReads a byte from the stream.
public double readDouble()
throws IOExceptionReads a doubleD b64 b56 b48 b40 b32 b24 b16 b8
- Overrides:
- readDouble in interface AbstractHessianInput
public void readEnd()
throws IOExceptionReads the end byte.
- Overrides:
- readEnd in interface AbstractHessianInput
private HashMap readFault()
throws IOExceptionReads a fault.
public float readFloat()
throws IOExceptionReads a floatD b64 b56 b48 b40 b32 b24 b16 b8
public String readHeader()
throws IOExceptionReads a header, returning null if there are no headers.H b16 b8 value
public InputStream readInputStream()
throws IOExceptionReads bytes based on an input stream.
- Overrides:
- readInputStream in interface AbstractHessianInput
public int readInt()
throws IOExceptionReads an integerI b32 b24 b16 b8
- Overrides:
- readInt in interface AbstractHessianInput
public int readLength()
throws IOExceptionParses the length for an arrayl b32 b24 b16 b8
- Overrides:
- readLength in interface AbstractHessianInput
public void readListEnd()
throws IOExceptionReads the end byte.
- Overrides:
- readListEnd in interface AbstractHessianInput
public int readListStart()
throws IOExceptionReads the start of a list.
- Overrides:
- readListStart in interface AbstractHessianInput
public long readLong()
throws IOExceptionReads a longL b64 b56 b48 b40 b32 b24 b16 b8
- Overrides:
- readLong in interface AbstractHessianInput
public void readMapEnd()
throws IOExceptionReads the end byte.
- Overrides:
- readMapEnd in interface AbstractHessianInput
public int readMapStart()
throws IOExceptionReads the start of a list.
- Overrides:
- readMapStart in interface AbstractHessianInput
public String readMethod()
throws IOExceptionStarts reading the call A successful completion will have a single value:m b16 b8 method
public org.w3c.dom.Node readNode()
throws IOExceptionReads an XML node.S b16 b8 string value
- Overrides:
- readNode in interface AbstractHessianInput
public void readNull()
throws IOExceptionReads a nullN
- Overrides:
- readNull in interface AbstractHessianInput
public Object readObject()
throws IOExceptionReads an arbitrary object from the input stream when the type is unknown.
- Overrides:
- readObject in interface AbstractHessianInput
public Object readObject(Class cl)
throws IOExceptionReads an object from the input stream with an expected type.
- Overrides:
- readObject in interface AbstractHessianInput
public Object readRef()
throws IOExceptionReads a reference.
- Overrides:
- readRef in interface AbstractHessianInput
public Object readRemote()
throws IOExceptionReads a remote object.
- Overrides:
- readRemote in interface AbstractHessianInput
public Object readReply(Class expectedClass)
throws ThrowableReads a reply as an object. If the reply has a fault, throws the exception.
- Overrides:
- readReply in interface AbstractHessianInput
public short readShort()
throws IOExceptionReads a shortI b32 b24 b16 b8
public String readString()
throws IOExceptionReads a stringS b16 b8 string value
- Overrides:
- readString in interface AbstractHessianInput
public int readString(char[] buffer,
int offset,
int length)
throws IOExceptionReads a byte array from the stream.
public String readType()
throws IOExceptionParses a type from the stream.t b16 b8
- Overrides:
- readType in interface AbstractHessianInput
public long readUTCDate()
throws IOExceptionReads a date.T b64 b56 b48 b40 b32 b24 b16 b8
- Overrides:
- readUTCDate in interface AbstractHessianInput
public Object resolveRemote(String type,
String url)
throws IOExceptionResolves a remote object.
public void setRef(int i,
Object ref)Adds a list/map reference.
- Overrides:
- setRef in interface AbstractHessianInput
public void setSerializerFactory(SerializerFactory factory)
Sets the serializer factory.
public void startCall()
throws IOExceptionStarts reading the call A successful completion will have a single value:c major minor m b16 b8 method
- Overrides:
- startCall in interface AbstractHessianInput
public void startReply()
throws ThrowableStarts reading the reply A successful completion will have a single value:r
- Overrides:
- startReply in interface AbstractHessianInput