public static class MerkleTree.MerkleTreeSerializer extends java.lang.Object implements IVersionedSerializer<MerkleTree>
Constructor and Description |
---|
MerkleTreeSerializer() |
Modifier and Type | Method and Description |
---|---|
MerkleTree |
deserialize(DataInputPlus in,
int version)
Deserialize into the specified DataInputStream instance.
|
void |
serialize(MerkleTree mt,
DataOutputPlus out,
int version)
Serialize the specified type into the specified DataOutputStream instance.
|
long |
serializedSize(MerkleTree mt,
int version)
Calculate serialized size of object without actually serializing.
|
public void serialize(MerkleTree mt, DataOutputPlus out, int version) throws java.io.IOException
IVersionedSerializer
serialize
in interface IVersionedSerializer<MerkleTree>
mt
- type that needs to be serializedout
- DataOutput into which serialization needs to happen.version
- protocol versionjava.io.IOException
- if serialization failspublic MerkleTree deserialize(DataInputPlus in, int version) throws java.io.IOException
IVersionedSerializer
deserialize
in interface IVersionedSerializer<MerkleTree>
in
- DataInput from which deserialization needs to happen.version
- protocol versionjava.io.IOException
- if deserialization failspublic long serializedSize(MerkleTree mt, int version)
IVersionedSerializer
serializedSize
in interface IVersionedSerializer<MerkleTree>
mt
- object to calculate serialized sizeversion
- protocol versionCopyright © 2017 The Apache Software Foundation