ml.shifu.guagua.io
接口 Serializer<RESULT extends Bytable>

所有已知实现类:
BytableSerializer, Bzip2BytableSerializer, GZIPBytableSerializer

public interface Serializer<RESULT extends Bytable>

Serializer is used to serialize Bytable object to bytes and de-serialize bytes to Bytable object.

A CONTRACT here: To make sure halt status in Bytable can be serialized or de-serialized. Please make sure to write and read halt status in Bytable.


方法摘要
 RESULT bytesToObject(byte[] data, String className)
          Transform byte array to object.
 byte[] objectToBytes(RESULT result)
          Transform object to byte array.
 

方法详细信息

objectToBytes

byte[] objectToBytes(RESULT result)
Transform object to byte array.


bytesToObject

RESULT bytesToObject(byte[] data,
                     String className)
Transform byte array to object. Because of generic erasion, className should be provided.



Copyright © 2014. All Rights Reserved.