public class CompressingSerializer extends Object implements IElementSerializer
Constructor and Description |
---|
CompressingSerializer() |
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.
|
protected <T> T |
deserializeObject(byte[] decompressedByteArray)
Does the standard deserialization.
|
<T> byte[] |
serialize(T obj)
Serializes an object using default serialization.
|
protected <T> byte[] |
serializeObject(T obj)
Does the basic serialization.
|
public CompressingSerializer()
public <T> byte[] serialize(T obj) throws IOException
serialize
in interface IElementSerializer
obj
- objectIOException
- on i/o problemprotected <T> byte[] serializeObject(T obj) throws IOException
obj
- objectIOException
- on i/o problempublic <T> T deSerialize(byte[] data, ClassLoader loader) throws IOException, ClassNotFoundException
deSerialize
in interface IElementSerializer
data
- bytes of dataIOException
- on i/o problemClassNotFoundException
- if class is not found during deserializationprotected <T> T deserializeObject(byte[] decompressedByteArray) throws IOException, ClassNotFoundException
decompressedByteArray
- array of decompressed bytesIOException
- on i/o errorClassNotFoundException
- if class is not found during deserializationCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.