org.fusesource.hawtbuf.codec
Class VarSignedIntegerCodec
java.lang.Object
org.fusesource.hawtbuf.codec.VarIntegerCodec
org.fusesource.hawtbuf.codec.VarSignedIntegerCodec
- All Implemented Interfaces:
- Codec<Integer>
public class VarSignedIntegerCodec
- extends VarIntegerCodec
Implementation of a variable length Codec for a signed Integer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final VarSignedIntegerCodec INSTANCE
VarSignedIntegerCodec
public VarSignedIntegerCodec()
encode
public void encode(Integer 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<Integer>
- Overrides:
encode
in class VarIntegerCodec
- Throws:
IOException
decode
public Integer 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<Integer>
- Overrides:
decode
in class VarIntegerCodec
- Returns:
- unmarshalled object
- Throws:
IOException
estimatedSize
public int estimatedSize(Integer value)
- Specified by:
estimatedSize
in interface Codec<Integer>
- Overrides:
estimatedSize
in class VarIntegerCodec
- Returns:
- the estimated marshaled size of the object.
Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.