com.caucho.hessian.io
Class JavaDeserializer

java.lang.Object
  extended by com.caucho.hessian.io.AbstractDeserializer
      extended by com.caucho.hessian.io.AbstractMapDeserializer
          extended by com.caucho.hessian.io.JavaDeserializer
All Implemented Interfaces:
Deserializer
Direct Known Subclasses:
RemoteDeserializer, StackTraceElementDeserializer

public class JavaDeserializer
extends AbstractMapDeserializer

Serializing an object for known object types.


Field Summary
 
Fields inherited from class com.caucho.hessian.io.AbstractDeserializer
NULL
 
Constructor Summary
JavaDeserializer(Class<?> cl)
           
 
Method Summary
 Object createField(String name)
          Creates a field value class.
 Object[] createFields(int len)
          Creates the field array for a class.
protected  HashMap<String,com.caucho.hessian.io.JavaDeserializer.FieldDeserializer> getFieldMap(Class cl)
          Creates a map of the classes fields.
protected static Object getParamArg(Class<?> cl)
          Creates a map of the classes fields.
protected  Method getReadResolve(Class<?> cl)
          Returns the readResolve method
 Class<?> getType()
           
protected  Object instantiate()
           
 boolean isReadResolve()
           
 Object readMap(AbstractHessianInput in)
           
 Object readMap(AbstractHessianInput in, Object obj)
           
 Object readObject(AbstractHessianInput in, Object[] fields)
          Reads an object instance from the input stream
 Object readObject(AbstractHessianInput in, Object obj, String[] fieldNames)
           
 Object readObject(AbstractHessianInput in, String[] fieldNames)
           
protected  Object resolve(AbstractHessianInput in, Object obj)
           
 
Methods inherited from class com.caucho.hessian.io.AbstractMapDeserializer
readObject
 
Methods inherited from class com.caucho.hessian.io.AbstractDeserializer
codeName, error, readLengthList, readList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaDeserializer

public JavaDeserializer(Class<?> cl)
Method Detail

getType

public Class<?> getType()
Specified by:
getType in interface Deserializer
Overrides:
getType in class AbstractMapDeserializer

isReadResolve

public boolean isReadResolve()
Specified by:
isReadResolve in interface Deserializer
Overrides:
isReadResolve in class AbstractDeserializer

readMap

public Object readMap(AbstractHessianInput in)
               throws IOException
Specified by:
readMap in interface Deserializer
Overrides:
readMap in class AbstractDeserializer
Throws:
IOException

createFields

public Object[] createFields(int len)
Description copied from class: AbstractDeserializer
Creates the field array for a class. The default implementation returns a String[] array.

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

createField

public Object createField(String name)
Description copied from class: AbstractDeserializer
Creates a field value class. The default implementation returns the String.

Specified by:
createField in interface Deserializer
Overrides:
createField in class AbstractDeserializer
Parameters:
name - the field name
Returns:
the new empty array

readObject

public Object readObject(AbstractHessianInput in,
                         Object[] fields)
                  throws IOException
Description copied from class: AbstractDeserializer
Reads an object instance from the input stream

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

readObject

public Object readObject(AbstractHessianInput in,
                         String[] fieldNames)
                  throws IOException
Specified by:
readObject in interface Deserializer
Overrides:
readObject in class AbstractDeserializer
Throws:
IOException

getReadResolve

protected Method getReadResolve(Class<?> cl)
Returns the readResolve method


readMap

public Object readMap(AbstractHessianInput in,
                      Object obj)
               throws IOException
Throws:
IOException

readObject

public Object readObject(AbstractHessianInput in,
                         Object obj,
                         String[] fieldNames)
                  throws IOException
Throws:
IOException

resolve

protected Object resolve(AbstractHessianInput in,
                         Object obj)
                  throws Exception
Throws:
Exception

instantiate

protected Object instantiate()
                      throws Exception
Throws:
Exception

getFieldMap

protected HashMap<String,com.caucho.hessian.io.JavaDeserializer.FieldDeserializer> getFieldMap(Class cl)
Creates a map of the classes fields.


getParamArg

protected static Object getParamArg(Class<?> cl)
Creates a map of the classes fields.



Copyright © 2013. All Rights Reserved.