org.fusesource.hawtbuf.codec
Class VarSignedLongCodec
java.lang.Object
org.fusesource.hawtbuf.codec.VarLongCodec
org.fusesource.hawtbuf.codec.VarSignedLongCodec
- All Implemented Interfaces:
- Codec<java.lang.Long>
public class VarSignedLongCodec
- extends VarLongCodec
Implementation of a variable length Codec for a signed Long
Method Summary |
java.lang.Long |
decode(java.io.DataInput dataIn)
Read the payload of the object from the DataInput stream. |
void |
encode(java.lang.Long value,
java.io.DataOutput dataOut)
Write the payload of the object to the DataOutput stream. |
int |
estimatedSize(java.lang.Long value)
|
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(java.lang.Long value,
java.io.DataOutput dataOut)
throws java.io.IOException
- Description copied from interface:
Codec
- Write the payload of the object to the DataOutput stream.
- Specified by:
encode
in interface Codec<java.lang.Long>
- Overrides:
encode
in class VarLongCodec
- Throws:
java.io.IOException
decode
public java.lang.Long decode(java.io.DataInput dataIn)
throws java.io.IOException
- Description copied from interface:
Codec
- Read the payload of the object from the DataInput stream.
- Specified by:
decode
in interface Codec<java.lang.Long>
- Overrides:
decode
in class VarLongCodec
- Returns:
- unmarshalled object
- Throws:
java.io.IOException
estimatedSize
public int estimatedSize(java.lang.Long value)
- Specified by:
estimatedSize
in interface Codec<java.lang.Long>
- Overrides:
estimatedSize
in class VarLongCodec
- Returns:
- the estimated marshaled size of the object.
Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.