public class Bzip2BytableSerializer<RESULT extends Bytable> extends Object implements Serializer<RESULT>
Bzip2BytableSerializer is using bzip2 compression algorithm for serialization.
Byte array by using Bzip2BytableSerializer is bzip2 format.
Serializer,
BytableSerializer| Constructor and Description |
|---|
Bzip2BytableSerializer() |
| Modifier and Type | Method and Description |
|---|---|
RESULT |
bytesToObject(byte[] data,
String className)
De-serialize from bytes to object.
|
byte[] |
objectToBytes(RESULT result)
Serialize from object to bytes.
|
public byte[] objectToBytes(RESULT result)
objectToBytes in interface Serializer<RESULT extends Bytable>NullPointerException - if result is null.GuaguaRuntimeException - if any io exception.public RESULT bytesToObject(byte[] data, String className)
bytesToObject in interface Serializer<RESULT extends Bytable>NullPointerException - if className or data is null.GuaguaRuntimeException - if any io exception or other reflection exception.Copyright © 2018. All Rights Reserved.