ml.shifu.guagua.io
类 Bzip2BytableSerializer<RESULT extends Bytable>

java.lang.Object
  继承者 ml.shifu.guagua.io.Bzip2BytableSerializer<RESULT>
所有已实现的接口:
Serializer<RESULT>

public class Bzip2BytableSerializer<RESULT extends Bytable>
extends Object
implements Serializer<RESULT>

Bzip2BytableSerializer is usingBytable.write(java.io.DataOutput) and Bytable.readFields(java.io.DataInput) to serialize object to bytes and de-serialize bytes to object.


构造方法摘要
Bzip2BytableSerializer()
           
 
方法摘要
 RESULT bytesToObject(byte[] data, String className)
          De-serialize from bytes to object.
 byte[] objectToBytes(RESULT result)
          Serialize from object to bytes.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Bzip2BytableSerializer

public Bzip2BytableSerializer()
方法详细信息

objectToBytes

public byte[] objectToBytes(RESULT result)
Serialize from object to bytes.

指定者:
接口 Serializer<RESULT extends Bytable> 中的 objectToBytes
抛出:
NullPointerException - if result is null.
GuaguaRuntimeException - if any io exception.

bytesToObject

public RESULT bytesToObject(byte[] data,
                            String className)
De-serialize from bytes to object. One should provide the class name before de-serializing the object.

指定者:
接口 Serializer<RESULT extends Bytable> 中的 bytesToObject
抛出:
NullPointerException - if className or data is null.
GuaguaRuntimeException - if any io exception or other reflection exception.


Copyright © 2014. All Rights Reserved.