org.fusesource.hawtbuf.codec
Class VarSignedIntegerCodec

java.lang.Object
  extended by org.fusesource.hawtbuf.codec.VarIntegerCodec
      extended by org.fusesource.hawtbuf.codec.VarSignedIntegerCodec
All Implemented Interfaces:
Codec<java.lang.Integer>

public class VarSignedIntegerCodec
extends VarIntegerCodec

Implementation of a variable length Codec for a signed Integer


Field Summary
static VarSignedIntegerCodec INSTANCE
           
 
Constructor Summary
VarSignedIntegerCodec()
           
 
Method Summary
 java.lang.Integer decode(java.io.DataInput dataIn)
          Read the payload of the object from the DataInput stream.
 void encode(java.lang.Integer value, java.io.DataOutput dataOut)
          Write the payload of the object to the DataOutput stream.
 int estimatedSize(java.lang.Integer value)
           
 
Methods inherited from class org.fusesource.hawtbuf.codec.VarIntegerCodec
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 VarSignedIntegerCodec INSTANCE
Constructor Detail

VarSignedIntegerCodec

public VarSignedIntegerCodec()
Method Detail

encode

public void encode(java.lang.Integer 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.Integer>
Overrides:
encode in class VarIntegerCodec
Throws:
java.io.IOException

decode

public java.lang.Integer 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.Integer>
Overrides:
decode in class VarIntegerCodec
Returns:
unmarshalled object
Throws:
java.io.IOException

estimatedSize

public int estimatedSize(java.lang.Integer value)
Specified by:
estimatedSize in interface Codec<java.lang.Integer>
Overrides:
estimatedSize in class VarIntegerCodec
Returns:
the estimated marshaled size of the object.


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.