org.openamf.io
Class AMFDeserializer

java.lang.Object
  extended byorg.openamf.io.AMFDeserializer

public class AMFDeserializer
extends java.lang.Object

AMF Deserializer

Version:
$Revision: 1.38 $, $Date: 2004/12/09 04:50:07 $
Author:
Jason Calabrese , Pat Maddox , Sylwester Lachiewicz

Field Summary
protected  java.util.List bodies
          Content of the bodies
protected  int bodyCount
          Number of bodies
protected  int headerCount
          Number of headers in the packet
protected  java.util.List headers
          Content of the headers
protected  java.io.DataInputStream inputStream
          The AMF input stream
protected  AMFMessage message
          Object to store the deserialized data
 
Constructor Summary
AMFDeserializer(java.io.DataInputStream inputStream)
          Deserialize message
 
Method Summary
 AMFMessage getAMFMessage()
           
protected  java.util.List readArray()
          Reads array
protected  java.lang.Object readASObject()
          Reads object
protected  void readBodies()
          Read message body
protected  java.lang.Object readCustomClass()
          Reads custom class
protected  java.lang.Object readData(byte type)
          Reads object from inputstream with selected type
protected  java.util.Date readDate()
          Reads date
protected  java.lang.Object readFlushedSO()
          Reads flushed stored object
protected  void readHeaders()
          Read message header
protected  ASObject readObject()
           
protected  ASObject readObject(ASObject aso)
          Reads an object and converts the binary data into an List
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputStream

protected java.io.DataInputStream inputStream
The AMF input stream


headerCount

protected int headerCount
Number of headers in the packet


headers

protected java.util.List headers
Content of the headers


bodyCount

protected int bodyCount
Number of bodies


bodies

protected java.util.List bodies
Content of the bodies


message

protected AMFMessage message
Object to store the deserialized data

Constructor Detail

AMFDeserializer

public AMFDeserializer(java.io.DataInputStream inputStream)
                throws java.io.IOException
Deserialize message

Parameters:
inputStream - message input stream
Throws:
java.io.IOException
Method Detail

getAMFMessage

public AMFMessage getAMFMessage()

readHeaders

protected void readHeaders()
                    throws java.io.IOException
Read message header

Throws:
java.io.IOException

readBodies

protected void readBodies()
                   throws java.io.IOException
Read message body

Throws:
java.io.IOException

readCustomClass

protected java.lang.Object readCustomClass()
                                    throws java.io.IOException
Reads custom class

Returns:
Throws:
java.io.IOException

readObject

protected ASObject readObject()
                       throws java.io.IOException
Throws:
java.io.IOException

readObject

protected ASObject readObject(ASObject aso)
                       throws java.io.IOException
Reads an object and converts the binary data into an List

Parameters:
aso -
Returns:
Throws:
java.io.IOException

readArray

protected java.util.List readArray()
                            throws java.io.IOException
Reads array

Returns:
Throws:
java.io.IOException

readDate

protected java.util.Date readDate()
                           throws java.io.IOException
Reads date

Returns:
Throws:
java.io.IOException

readFlushedSO

protected java.lang.Object readFlushedSO()
                                  throws java.io.IOException
Reads flushed stored object

Returns:
Throws:
java.io.IOException

readASObject

protected java.lang.Object readASObject()
Reads object

Returns:

readData

protected java.lang.Object readData(byte type)
                             throws java.io.IOException
Reads object from inputstream with selected type

Parameters:
type -
Returns:
Throws:
java.io.IOException