org.granite.messaging.amf.io
Class AMF0Deserializer

java.lang.Object
  extended by org.granite.messaging.amf.io.AMF0Deserializer

public class AMF0Deserializer
extends Object

AMF Deserializer

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

Constructor Summary
AMF0Deserializer(InputStream inputStream)
          Deserialize message
 
Method Summary
static Document convertToDOM(DataInputStream is)
           
 AMF0Message getAMFMessage()
           
protected  Object readAMF3Data()
          Reads object
protected  List<?> readArray()
          Reads array
protected  Object readASObject()
          Reads object
protected  void readBodies()
          Read message body
protected  Object readCustomClass()
          Reads custom class
protected  Object readData(byte type)
          Reads object from inputstream with selected type
protected  Date readDate()
          Reads date
protected  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
 

Constructor Detail

AMF0Deserializer

public AMF0Deserializer(InputStream inputStream)
                 throws IOException
Deserialize message

Parameters:
inputStream - message input stream
Throws:
IOException
Method Detail

getAMFMessage

public AMF0Message getAMFMessage()

readHeaders

protected void readHeaders()
                    throws IOException
Read message header

Throws:
IOException

readBodies

protected void readBodies()
                   throws IOException
Read message body

Throws:
IOException

readCustomClass

protected Object readCustomClass()
                          throws IOException
Reads custom class

Returns:
the read Object
Throws:
IOException

readObject

protected ASObject readObject()
                       throws IOException
Throws:
IOException

readObject

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

Parameters:
aso -
Returns:
the read object
Throws:
IOException

readArray

protected List<?> readArray()
                     throws IOException
Reads array

Returns:
the read array (as a list).
Throws:
IOException

readDate

protected Date readDate()
                 throws IOException
Reads date

Returns:
the read date
Throws:
IOException

readFlushedSO

protected Object readFlushedSO()
                        throws IOException
Reads flushed stored object

Returns:
the stored object
Throws:
IOException

readASObject

protected Object readASObject()
Reads object

Returns:
always null...

readAMF3Data

protected Object readAMF3Data()
                       throws IOException
Reads object

Returns:
the AMF3 decoded object
Throws:
IOException

readData

protected Object readData(byte type)
                   throws IOException
Reads object from inputstream with selected type

Parameters:
type -
Returns:
the read object
Throws:
IOException

convertToDOM

public static Document convertToDOM(DataInputStream is)
                             throws IOException
Throws:
IOException