Package com.caucho.hessian.io
Class AbstractDeserializer
- java.lang.Object
-
- 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 Object implements Deserializer
Deserializing an object.
-
-
Field Summary
Fields Modifier and Type Field Description static com.caucho.hessian.io.AbstractDeserializer.NullDeserializerNULL
-
Constructor Summary
Constructors Constructor Description AbstractDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringcodeName(int ch)ObjectcreateField(String name)Creates a field value class.Object[]createFields(int len)Creates the field array for a class.protected HessianProtocolExceptionerror(String msg)Class<?>getType()booleanisReadResolve()ObjectreadLengthList(AbstractHessianInput in, int length)ObjectreadList(AbstractHessianInput in, int length)ObjectreadMap(AbstractHessianInput in)ObjectreadObject(AbstractHessianInput in)ObjectreadObject(AbstractHessianInput in, Object[] fields)Reads an object instance from the input streamObjectreadObject(AbstractHessianInput in, String[] fieldNames)
-
-
-
Method Detail
-
getType
public Class<?> getType()
- Specified by:
getTypein interfaceDeserializer
-
isReadResolve
public boolean isReadResolve()
- Specified by:
isReadResolvein interfaceDeserializer
-
readObject
public Object readObject(AbstractHessianInput in) throws IOException
- Specified by:
readObjectin interfaceDeserializer- Throws:
IOException
-
readList
public Object readList(AbstractHessianInput in, int length) throws IOException
- Specified by:
readListin interfaceDeserializer- Throws:
IOException
-
readLengthList
public Object readLengthList(AbstractHessianInput in, int length) throws IOException
- Specified by:
readLengthListin interfaceDeserializer- Throws:
IOException
-
readMap
public Object readMap(AbstractHessianInput in) throws IOException
- Specified by:
readMapin interfaceDeserializer- Throws:
IOException
-
createFields
public Object[] createFields(int len)
Creates the field array for a class. The default implementation returns a String[] array.- Specified by:
createFieldsin interfaceDeserializer- Parameters:
len- number of items in the array- Returns:
- the new empty array
-
createField
public Object createField(String name)
Creates a field value class. The default implementation returns the String.- Specified by:
createFieldin interfaceDeserializer- Parameters:
len- number of items in the array- Returns:
- the new empty array
-
readObject
public Object readObject(AbstractHessianInput in, String[] fieldNames) throws IOException
- Specified by:
readObjectin interfaceDeserializer- Throws:
IOException
-
readObject
public Object readObject(AbstractHessianInput in, Object[] fields) throws IOException
Reads an object instance from the input stream- Specified by:
readObjectin interfaceDeserializer- Parameters:
in- the input streamfields- the deserializer's own field marshal- Returns:
- the new object
- Throws:
IOException
-
error
protected HessianProtocolException error(String msg)
-
codeName
protected String codeName(int ch)
-
-