org.granite.messaging.amf.io
Class AMF3Deserializer

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by org.granite.messaging.amf.io.AMF3Deserializer
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, AMF3Constants

public class AMF3Deserializer
extends DataInputStream
implements ObjectInput, AMF3Constants

Author:
Franck WOLFF

Field Summary
protected  GraniteContext context
           
protected  boolean debug
           
protected  boolean debugMore
           
protected static Logger log
           
protected static Logger logMore
           
protected  AMF3DeserializerSecurizer securizer
           
protected  List<ActionScriptClassDescriptor> storedClassDescriptors
           
protected  List<Object> storedObjects
           
protected  List<String> storedStrings
           
protected  XMLUtil xmlUtil
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from interface org.granite.messaging.amf.AMF3Constants
AMF3_ARRAY, AMF3_BOOLEAN_FALSE, AMF3_BOOLEAN_TRUE, AMF3_BYTEARRAY, AMF3_DATE, AMF3_INTEGER, AMF3_INTEGER_MAX, AMF3_INTEGER_MIN, AMF3_NULL, AMF3_NUMBER, AMF3_OBJECT, AMF3_STRING, AMF3_UNDEFINED, AMF3_VECTOR_INT, AMF3_VECTOR_NUMBER, AMF3_VECTOR_OBJECT, AMF3_VECTOR_UINT, AMF3_XML, AMF3_XMLSTRING
 
Constructor Summary
AMF3Deserializer(InputStream in)
           
 
Method Summary
protected  void addToStoredClassDescriptors(ActionScriptClassDescriptor desc)
           
protected  int addToStoredObjects(Object o)
           
protected  void addToStoredStrings(String s)
           
protected  ActionScriptClassDescriptor getFromStoredClassDescriptors(int index)
           
protected  Object getFromStoredObjects(int index)
           
protected  String getFromStoredStrings(int index)
           
protected  Object readAMF3Array()
           
protected  byte[] readAMF3ByteArray()
           
protected  Date readAMF3Date()
           
protected  Double readAMF3Double()
           
protected  int readAMF3Integer()
           
protected  Object readAMF3Object()
           
protected  String readAMF3String()
           
protected  Object readAMF3VectorInt()
           
protected  Object readAMF3VectorNumber()
           
protected  Object readAMF3VectorObject()
           
protected  Object readAMF3VectorUInt()
           
protected  Document readAMF3Xml()
           
protected  String readAMF3XmlString()
           
protected  byte[] readBytes(int count)
           
 Object readObject()
           
protected  Object readObject(int type)
           
protected  void setStoredObject(int index, Object o)
           
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectInput
available, close, read, read, read, skip
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Field Detail

log

protected static final Logger log

logMore

protected static final Logger logMore

storedStrings

protected final List<String> storedStrings

storedObjects

protected final List<Object> storedObjects

storedClassDescriptors

protected final List<ActionScriptClassDescriptor> storedClassDescriptors

context

protected final GraniteContext context

securizer

protected final AMF3DeserializerSecurizer securizer

xmlUtil

protected final XMLUtil xmlUtil

debug

protected final boolean debug

debugMore

protected final boolean debugMore
Constructor Detail

AMF3Deserializer

public AMF3Deserializer(InputStream in)
Method Detail

readObject

public Object readObject()
                  throws IOException
Specified by:
readObject in interface ObjectInput
Throws:
IOException

readObject

protected Object readObject(int type)
                     throws IOException
Throws:
IOException

readAMF3Integer

protected int readAMF3Integer()
                       throws IOException
Throws:
IOException

readAMF3Double

protected Double readAMF3Double()
                         throws IOException
Throws:
IOException

readAMF3String

protected String readAMF3String()
                         throws IOException
Throws:
IOException

readAMF3Date

protected Date readAMF3Date()
                     throws IOException
Throws:
IOException

readAMF3Array

protected Object readAMF3Array()
                        throws IOException
Throws:
IOException

readAMF3VectorInt

protected Object readAMF3VectorInt()
                            throws IOException
Throws:
IOException

readAMF3VectorUInt

protected Object readAMF3VectorUInt()
                             throws IOException
Throws:
IOException

readAMF3VectorNumber

protected Object readAMF3VectorNumber()
                               throws IOException
Throws:
IOException

readAMF3VectorObject

protected Object readAMF3VectorObject()
                               throws IOException
Throws:
IOException

readAMF3Object

protected Object readAMF3Object()
                         throws IOException
Throws:
IOException

readAMF3Xml

protected Document readAMF3Xml()
                        throws IOException
Throws:
IOException

readAMF3XmlString

protected String readAMF3XmlString()
                            throws IOException
Throws:
IOException

readAMF3ByteArray

protected byte[] readAMF3ByteArray()
                            throws IOException
Throws:
IOException

addToStoredStrings

protected void addToStoredStrings(String s)

getFromStoredStrings

protected String getFromStoredStrings(int index)

addToStoredObjects

protected int addToStoredObjects(Object o)

setStoredObject

protected void setStoredObject(int index,
                               Object o)

getFromStoredObjects

protected Object getFromStoredObjects(int index)

addToStoredClassDescriptors

protected void addToStoredClassDescriptors(ActionScriptClassDescriptor desc)

getFromStoredClassDescriptors

protected ActionScriptClassDescriptor getFromStoredClassDescriptors(int index)

readBytes

protected byte[] readBytes(int count)
                    throws IOException
Throws:
IOException