com.caucho.hessian.io
Class AbstractDeserializer

java.lang.Object
  extended by com.caucho.hessian.io.AbstractDeserializer
All Implemented Interfaces:
Deserializer
Direct Known Subclasses:
AbstractListDeserializer, AbstractMapDeserializer, AbstractStreamDeserializer, AbstractStringValueDeserializer, BasicDeserializer, EnumDeserializer, InputStreamDeserializer, MBeanAttributeInfoDeserializer, MBeanConstructorInfoDeserializer, MBeanInfoDeserializer, MBeanNotificationInfoDeserializer, MBeanOperationInfoDeserializer, MBeanParameterInfoDeserializer, ObjectDeserializer, ObjectInstanceDeserializer, SqlDateDeserializer, ValueDeserializer

public class AbstractDeserializer
extends java.lang.Object
implements Deserializer

Deserializing an object.


Field Summary
static com.caucho.hessian.io.AbstractDeserializer.NullDeserializer NULL
           
 
Constructor Summary
AbstractDeserializer()
           
 
Method Summary
protected  java.lang.String codeName(int ch)
           
 java.lang.Object createField(java.lang.String name)
          Creates a field value class.
 java.lang.Object[] createFields(int len)
          Creates the field array for a class.
protected  HessianProtocolException error(java.lang.String msg)
           
 java.lang.Class<?> getType()
           
 boolean isReadResolve()
           
 java.lang.Object readLengthList(AbstractHessianInput in, int length)
           
 java.lang.Object readList(AbstractHessianInput in, int length)
           
 java.lang.Object readMap(AbstractHessianInput in)
           
 java.lang.Object readObject(AbstractHessianInput in)
           
 java.lang.Object readObject(AbstractHessianInput in, java.lang.Object[] fields)
          Reads an object instance from the input stream
 java.lang.Object readObject(AbstractHessianInput in, java.lang.String[] fieldNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final com.caucho.hessian.io.AbstractDeserializer.NullDeserializer NULL
Constructor Detail

AbstractDeserializer

public AbstractDeserializer()
Method Detail

getType

public java.lang.Class<?> getType()
Specified by:
getType in interface Deserializer

isReadResolve

public boolean isReadResolve()
Specified by:
isReadResolve in interface Deserializer

readObject

public java.lang.Object readObject(AbstractHessianInput in)
                            throws java.io.IOException
Specified by:
readObject in interface Deserializer
Throws:
java.io.IOException

readList

public java.lang.Object readList(AbstractHessianInput in,
                                 int length)
                          throws java.io.IOException
Specified by:
readList in interface Deserializer
Throws:
java.io.IOException

readLengthList

public java.lang.Object readLengthList(AbstractHessianInput in,
                                       int length)
                                throws java.io.IOException
Specified by:
readLengthList in interface Deserializer
Throws:
java.io.IOException

readMap

public java.lang.Object readMap(AbstractHessianInput in)
                         throws java.io.IOException
Specified by:
readMap in interface Deserializer
Throws:
java.io.IOException

createFields

public java.lang.Object[] createFields(int len)
Creates the field array for a class. The default implementation returns a String[] array.

Specified by:
createFields in interface Deserializer
Parameters:
len - number of items in the array
Returns:
the new empty array

createField

public java.lang.Object createField(java.lang.String name)
Creates a field value class. The default implementation returns the String.

Specified by:
createField in interface Deserializer
Parameters:
len - number of items in the array
Returns:
the new empty array

readObject

public java.lang.Object readObject(AbstractHessianInput in,
                                   java.lang.String[] fieldNames)
                            throws java.io.IOException
Specified by:
readObject in interface Deserializer
Throws:
java.io.IOException

readObject

public java.lang.Object readObject(AbstractHessianInput in,
                                   java.lang.Object[] fields)
                            throws java.io.IOException
Reads an object instance from the input stream

Specified by:
readObject in interface Deserializer
Parameters:
in - the input stream
fields - the deserializer's own field marshal
Returns:
the new object
Throws:
java.io.IOException

error

protected HessianProtocolException error(java.lang.String msg)

codeName

protected java.lang.String codeName(int ch)