com.alipay.hessian.generic.io
Class GenericDeserializer
java.lang.Object
com.caucho.hessian.io.AbstractDeserializer
com.alipay.hessian.generic.io.GenericDeserializer
- All Implemented Interfaces:
- com.caucho.hessian.io.Deserializer
public class GenericDeserializer
- extends com.caucho.hessian.io.AbstractDeserializer
此类用于反序列化GenericObject/GenericMap/GenericCollection
Collection对象或者数组对象反序列化会调用readList/readLengthList方法,根据type类型返回GenericCollection/GenericArray
Map对象反序列化会调用readMap方法,返回结果为GenericMap
Object对象反序列会调用readObject方法,返回结果为GenericObject
- Since:
- 5.3.0
|
Method Summary |
Object |
readLengthList(com.caucho.hessian.io.AbstractHessianInput in,
int length)
当读取list时会调用此方法 |
Object |
readList(com.caucho.hessian.io.AbstractHessianInput in,
int length)
当读取list时会调用此方法 |
Object |
readMap(com.caucho.hessian.io.AbstractHessianInput in)
当读取map时会调用此方法 |
Object |
readObject(com.caucho.hessian.io.AbstractHessianInput in,
String[] fieldNames)
当读取Object时会调用此方法, Object类型包括Enum与AliEnum |
| Methods inherited from class com.caucho.hessian.io.AbstractDeserializer |
codeName, error, getType, readObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ARRAY_PREFIX
public static final char ARRAY_PREFIX
- See Also:
- Constant Field Values
GenericDeserializer
public GenericDeserializer(String type)
readList
public Object readList(com.caucho.hessian.io.AbstractHessianInput in,
int length)
throws IOException
- 当读取list时会调用此方法
- Specified by:
readList in interface com.caucho.hessian.io.Deserializer- Overrides:
readList in class com.caucho.hessian.io.AbstractDeserializer
- Throws:
IOException
readLengthList
public Object readLengthList(com.caucho.hessian.io.AbstractHessianInput in,
int length)
throws IOException
- 当读取list时会调用此方法
- Specified by:
readLengthList in interface com.caucho.hessian.io.Deserializer- Overrides:
readLengthList in class com.caucho.hessian.io.AbstractDeserializer
- Throws:
IOException
readMap
public Object readMap(com.caucho.hessian.io.AbstractHessianInput in)
throws IOException
- 当读取map时会调用此方法
- Specified by:
readMap in interface com.caucho.hessian.io.Deserializer- Overrides:
readMap in class com.caucho.hessian.io.AbstractDeserializer
- Throws:
IOException
readObject
public Object readObject(com.caucho.hessian.io.AbstractHessianInput in,
String[] fieldNames)
throws IOException
- 当读取Object时会调用此方法, Object类型包括Enum与AliEnum
- Specified by:
readObject in interface com.caucho.hessian.io.Deserializer- Overrides:
readObject in class com.caucho.hessian.io.AbstractDeserializer
- Throws:
IOException
Copyright © 2008–2018 Ant Financial. All rights reserved.