com.caucho.hessian.io
Interface Deserializer

All Known Implementing Classes:
AbstractDeserializer, AbstractListDeserializer, AbstractMapDeserializer, AbstractStreamDeserializer, AbstractStringValueDeserializer, AnnotationDeserializer, ArrayDeserializer, BasicDeserializer, BeanDeserializer, BigDecimalDeserializer, ClassDeserializer, CollectionDeserializer, EnumDeserializer, EnumerationDeserializer, FileDeserializer, InputStreamDeserializer, JavaDeserializer, MapDeserializer, MBeanAttributeInfoDeserializer, MBeanConstructorInfoDeserializer, MBeanInfoDeserializer, MBeanNotificationInfoDeserializer, MBeanOperationInfoDeserializer, MBeanParameterInfoDeserializer, ObjectDeserializer, ObjectInstanceDeserializer, ObjectNameDeserializer, RemoteDeserializer, SqlDateDeserializer, StackTraceElementDeserializer, StreamSourceHessianDeserializer, StringValueDeserializer, ThrowableDeserializer, UnsafeDeserializer, ValueDeserializer

public interface Deserializer

Deserializing an object. Custom deserializers should extend from AbstractDeserializer to avoid issues with signature changes.


Method Summary
 java.lang.Object createField(java.lang.String name)
          Returns the deserializer's field reader for the given name.
 java.lang.Object[] createFields(int len)
          Creates an empty array for the deserializers field entries.
 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 the object from the input stream, given the field definition.
 java.lang.Object readObject(AbstractHessianInput in, java.lang.String[] fieldNames)
           
 

Method Detail

getType

java.lang.Class<?> getType()

isReadResolve

boolean isReadResolve()

readObject

java.lang.Object readObject(AbstractHessianInput in)
                            throws java.io.IOException
Throws:
java.io.IOException

readList

java.lang.Object readList(AbstractHessianInput in,
                          int length)
                          throws java.io.IOException
Throws:
java.io.IOException

readLengthList

java.lang.Object readLengthList(AbstractHessianInput in,
                                int length)
                                throws java.io.IOException
Throws:
java.io.IOException

readMap

java.lang.Object readMap(AbstractHessianInput in)
                         throws java.io.IOException
Throws:
java.io.IOException

createFields

java.lang.Object[] createFields(int len)
Creates an empty array for the deserializers field entries.

Parameters:
len - number of fields to be read
Returns:
empty array of the proper field type.

createField

java.lang.Object createField(java.lang.String name)
Returns the deserializer's field reader for the given name.

Parameters:
name - the field name
Returns:
the deserializer's internal field reader

readObject

java.lang.Object readObject(AbstractHessianInput in,
                            java.lang.Object[] fields)
                            throws java.io.IOException
Reads the object from the input stream, given the field definition.

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

readObject

java.lang.Object readObject(AbstractHessianInput in,
                            java.lang.String[] fieldNames)
                            throws java.io.IOException
Throws:
java.io.IOException