org.fusesource.hawtbuf.codec
Class VarSignedLongCodec
java.lang.Object
org.fusesource.hawtbuf.codec.VarLongCodec
org.fusesource.hawtbuf.codec.VarSignedLongCodec
- All Implemented Interfaces:
- Codec<Long>
public class VarSignedLongCodec
- extends VarLongCodec
Implementation of a variable length Codec for a signed Long
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final VarSignedLongCodec INSTANCE
VarSignedLongCodec
public VarSignedLongCodec()
encode
public void encode(Long value,
DataOutput dataOut)
throws IOException
- Description copied from interface:
Codec
- Write the payload of the object to the DataOutput stream.
- Specified by:
encode
in interface Codec<Long>
- Overrides:
encode
in class VarLongCodec
- Throws:
IOException
decode
public Long decode(DataInput dataIn)
throws IOException
- Description copied from interface:
Codec
- Read the payload of the object from the DataInput stream.
- Specified by:
decode
in interface Codec<Long>
- Overrides:
decode
in class VarLongCodec
- Returns:
- unmarshalled object
- Throws:
IOException
estimatedSize
public int estimatedSize(Long value)
- Specified by:
estimatedSize
in interface Codec<Long>
- Overrides:
estimatedSize
in class VarLongCodec
- Returns:
- the estimated marshaled size of the object.
Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.