public class TransactionEditCodecs extends Object
TransactionEdit
entries, while maintaining compatibility
with older versions of the serialized data.Constructor and Description |
---|
TransactionEditCodecs() |
Modifier and Type | Method and Description |
---|---|
static void |
decode(TransactionEdit dest,
DataInput in)
Deserializes the encoded data from the given input stream, setting the values as fields
on the given
TransactionEdit instances. |
static void |
encode(TransactionEdit src,
DataOutput out)
Serializes the given
TransactionEdit instance with the latest available codec. |
public static void decode(TransactionEdit dest, DataInput in) throws IOException
TransactionEdit
instances. This method expects first value in the
{code DataInput} to be a byte representing the codec version used to serialize the instance.dest
- the transaction edit to populate with the deserialized valuesin
- the input stream containing the encoded dataIOException
- if an error occurs while deserializing from the input streampublic static void encode(TransactionEdit src, DataOutput out) throws IOException
TransactionEdit
instance with the latest available codec.
This will first write out the version of the codec used to serialize the instance so that
the correct codec can be used when calling decode(TransactionEdit, DataInput)
.src
- the transaction edit to serializeout
- the output stream to contain the dataIOException
- if an error occurs while serializing to the output streamCopyright © 2017 The Apache Software Foundation. All rights reserved.