public class CompressingSerializer extends StandardSerializer
Constructor and Description |
---|
CompressingSerializer()
Default constructor
|
CompressingSerializer(IElementSerializer serializer)
Wrapper constructor
|
Modifier and Type | Method and Description |
---|---|
<T> T |
deSerialize(byte[] data,
ClassLoader loader)
Uses default de-serialization to turn a byte array into an object.
|
<T> byte[] |
serialize(T obj)
Serializes an object using default serialization.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deSerializeFrom, deSerializeFrom, deSerializeFrom, serializeTo, serializeTo, serializeTo
public CompressingSerializer()
public CompressingSerializer(IElementSerializer serializer)
serializer
- the wrapped serializerpublic <T> byte[] serialize(T obj) throws IOException
serialize
in interface IElementSerializer
serialize
in class StandardSerializer
T
- the type of the objectobj
- objectIOException
- on i/o problempublic <T> T deSerialize(byte[] data, ClassLoader loader) throws IOException, ClassNotFoundException
deSerialize
in interface IElementSerializer
deSerialize
in class StandardSerializer
data
- data bytesloader
- class loader to useIOException
- on i/o problemClassNotFoundException
- if class is not found during deserializationCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.