Packagehessian.io
Classpublic class Hessian2Input
InheritanceHessian2Input Inheritance hessian.io.AbstractHessianInput

A reader for the Hessian 2.0 protocol.



Public Methods
 MethodDefined by
  
Hessian2Input(di:IDataInput = null)
Creates a new Hessian2Input.
Hessian2Input
  
addRef(obj:Object):int
Adds an object reference.
Hessian2Input
  
completeCall():void
Completes reading the call.
Hessian2Input
  
Completes reading the envelope.
Hessian2Input
  
Completes reading the message.
Hessian2Input
  
Completes reading the call.
Hessian2Input
  
Completes reading the call.
Hessian2Input
  
getMethod():String
Returns the call's method.
Hessian2Input
  
getReplyFault():Error
Returns any reply fault.
Hessian2Input
  
init(di:IDataInput):void
Initialize the Hessian stream with the underlying IDataInput.
Hessian2Input
  
isEnd():Boolean
Returns true if the data has ended.
Hessian2Input
  
read():uint
Reads a byte from the stream.
Hessian2Input
  
readBoolean():Boolean
Reads a boolean.
Hessian2Input
  
readBytes():ByteArray
Reads a byte array.
Hessian2Input
  
readCall():int
Reads the call.
Hessian2Input
  
readChar():int
Reads a character from the stream.
Hessian2Input
  
readDouble():Number
Reads a double.
Hessian2Input
  
readEnd():void
Read the end byte.
Hessian2Input
  
Starts reading the envelope.
Hessian2Input
  
readHeader():String
Reads a header, returning null if there are no headers.
Hessian2Input
  
readInt():int
Reads an integer.
Hessian2Input
  
readLength():int
Parses the length for an array.
Hessian2Input
  
readListEnd():void
Read the end byte.
Hessian2Input
  
Reads the start of a list.
Hessian2Input
  
readLong():Number
Reads a long.
Hessian2Input
  
readMapEnd():void
Read the end byte.
Hessian2Input
  
Reads the start of a map.
Hessian2Input
  
readMethod():String
Starts reading the call.
Hessian2Input
  
readNull():void
Reads a null.
Hessian2Input
  
readObject(cl:Class = null):Object
Reads an arbitrary object from the input stream.
Hessian2Input
  
readRef():Object
Reads a reference.
Hessian2Input
  
readReply(expectedClass:Class):Object
Reads a reply as an object.
Hessian2Input
  
readString():String
Reads a string.
Hessian2Input
  
readType():String
Reads an object type.
Hessian2Input
  
readUTCDate():Number
Reads a date.
Hessian2Input
  
Resets the references for streaming.
Hessian2Input
  
setRef(i:int, obj:Object):void
Sets an object reference.
Hessian2Input
  
startCall():void
Starts reading the call, including the headers.
Hessian2Input
  
Starts reading the message.
Hessian2Input
  
startReply():void
Starts reading the reply.
Hessian2Input
Constructor detail
Hessian2Input()constructor
public function Hessian2Input(di:IDataInput = null)

Creates a new Hessian2Input.

Parameters
di:IDataInput (default = null) — The IDataInput from which this Hessian2Input will read.

See also

Method detail
addRef()method
public override function addRef(obj:Object):int

Adds an object reference.

Parameters
obj:Object — The object to which to add the reference.

Returns
int — The reference number.
completeCall()method 
public override function completeCall():void

Completes reading the call.

The call expects the following protocol data

       z
       

completeEnvelope()method 
public function completeEnvelope():void

Completes reading the envelope.

A successful completion will have a single value:

       z
       

completeMessage()method 
public function completeMessage():void

Completes reading the message.

A successful completion will have a single value:

       z
       

completeReply()method 
public override function completeReply():void

Completes reading the call.

A successful completion will have a single value:

      z
      

completeValueReply()method 
public function completeValueReply():void

Completes reading the call.

A successful completion will have a single value:

       z
       

getMethod()method 
public override function getMethod():String

Returns the call's method.

Returns
String
getReplyFault()method 
public function getReplyFault():Error

Returns any reply fault.

Returns
Error — The reply fault, if available.
init()method 
public override function init(di:IDataInput):void

Initialize the Hessian stream with the underlying IDataInput. This method will reset the internal data of this instance, meaning this Hessian2Input may be reused.

Parameters
di:IDataInput — The IDataInput from which this Hessian2Input will read.
isEnd()method 
public override function isEnd():Boolean

Returns true if the data has ended.

Returns
Boolean — Whether the data has ended.
read()method 
public final function read():uint

Reads a byte from the stream.

Returns
uint — The byte read as a uint.
readBoolean()method 
public override function readBoolean():Boolean

Reads a boolean.

       T
       F
       

Returns
Boolean — The boolean value read.
readBytes()method 
public override function readBytes():ByteArray

Reads a byte array.

       b b16 b8 non-final binary chunk
       B b16 b8 final binary chunk
       

Returns
ByteArray — A ByteArray with the bytes that were read.
readCall()method 
public override function readCall():int

Reads the call.

       c major minor
       

Returns
int
readChar()method 
public function readChar():int

Reads a character from the stream.

Returns
int — The UTF8 character value read as an integer.
readDouble()method 
public override function readDouble():Number

Reads a double.

       D b64 b56 b48 b40 b32 b24 b16 b8
       

Returns
Number — The double value read as a Number.
readEnd()method 
public override function readEnd():void

Read the end byte.

readEnvelope()method 
public function readEnvelope():int

Starts reading the envelope.

       E major minor
       

Returns
int
readHeader()method 
public override function readHeader():String

Reads a header, returning null if there are no headers.

       H b16 b8 value
       

Returns
String — The header if available or null otherwise.
readInt()method 
public override function readInt():int

Reads an integer.

       I b32 b24 b16 b8
       

Returns
int — The integer value read.
readLength()method 
public override function readLength():int

Parses the length for an array.

       l b32 b24 b16 b8
       

Returns
int — The length value read as an int.
readListEnd()method 
public override function readListEnd():void

Read the end byte.

readListStart()method 
public override function readListStart():int

Reads the start of a list.

Returns
int
readLong()method 
public override function readLong():Number

Reads a long.

       L b64 b56 b48 b40 b32 b24 b16 b8
       

Returns
Number — The long value read as a Number.
readMapEnd()method 
public override function readMapEnd():void

Read the end byte.

readMapStart()method 
public override function readMapStart():int

Reads the start of a map.

Returns
int
readMethod()method 
public override function readMethod():String

Starts reading the call.

A successful completion will have a single value:

       m b16 b8 method
       

Returns
String — The method name as read.
readNull()method 
public override function readNull():void

Reads a null.

       N
       

readObject()method 
public override function readObject(cl:Class = null):Object

Reads an arbitrary object from the input stream.

Parameters
cl:Class (default = null) — the expected class if the protocol doesn't supply it.

Returns
Object — The object value read.
readRef()method 
public override function readRef():Object

Reads a reference.

       R b32 b24 b16 b8
       

Returns
Object — The object to which the read reference refers.
readReply()method 
public override function readReply(expectedClass:Class):Object

Reads a reply as an object. If the reply has a fault, throws the exception.

Parameters
expectedClass:Class — The expected class of the reply.

Returns
Object — The reply value.
readString()method 
public override function readString():String

Reads a string.

       S b16 b8 string value
       

Returns
String — The string value read.
readType()method 
public override function readType():String

Reads an object type.

Returns
String — The type value read as a String.
readUTCDate()method 
public override function readUTCDate():Number

Reads a date.

       T b64 b56 b48 b40 b32 b24 b16 b8
       

Returns
Number — The date value read as a Number (milliseconds since the epoch).
resetReferences()method 
public override function resetReferences():void

Resets the references for streaming.

setRef()method 
public override function setRef(i:int, obj:Object):void

Sets an object reference.

Parameters
i:int — The reference number.
 
obj:Object — The object to which to add the reference.
startCall()method 
public override function startCall():void

Starts reading the call, including the headers.

The call expects the following protocol data

       c major minor
       m b16 b8 method
       

startMessage()method 
public function startMessage():int

Starts reading the message.

       p major minor
       

Returns
int — The version of the message.
startReply()method 
public override function startReply():void

Starts reading the reply.

A successful completion will have a single value:

       r
       v