public static class SimpleDatatypeCodecs.LongCodec extends Object implements DatatypeCodec<Long>
Long
.Constructor and Description |
---|
SimpleDatatypeCodecs.LongCodec() |
Modifier and Type | Method and Description |
---|---|
Long |
decode(DataInput in,
ClassLoader cl,
DecoderUtils utils)
Decode a value from the given data input stream.
|
void |
encode(Long value,
DataOutput out,
EncoderUtils utils)
Encode the specified value to the given data output stream.
|
public void encode(Long value, DataOutput out, EncoderUtils utils) throws IOException
DatatypeCodec
encode
in interface DatatypeCodec<Long>
value
- the value to encode. This will never be null
.out
- the data output stream to encode the value to.utils
- additional utility encoding functions that may be useful to the codec.IOException
- if an I/O error occurs.public Long decode(DataInput in, ClassLoader cl, DecoderUtils utils) throws IOException
DatatypeCodec
decode
in interface DatatypeCodec<Long>
in
- the data input stream to decode the value from.cl
- a classloader which can be used to load classes necessary
to decode the value.utils
- additional utility decoding functions that may be useful to the codec.IOException
- if an I/O error occurs.