org.fusesource.hawtbuf.codec
Class VarSignedLongCodec

java.lang.Object
  extended by org.fusesource.hawtbuf.codec.VarLongCodec
      extended by 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


Field Summary
static VarSignedLongCodec INSTANCE
           
 
Constructor Summary
VarSignedLongCodec()
           
 
Method Summary
 Long decode(DataInput dataIn)
          Read the payload of the object from the DataInput stream.
 void encode(Long value, DataOutput dataOut)
          Write the payload of the object to the DataOutput stream.
 int estimatedSize(Long value)
           
 
Methods inherited from class org.fusesource.hawtbuf.codec.VarLongCodec
deepCopy, getFixedSize, isDeepCopySupported, isEstimatedSizeSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final VarSignedLongCodec INSTANCE
Constructor Detail

VarSignedLongCodec

public VarSignedLongCodec()
Method Detail

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.