Class VarIntegerCodec
java.lang.Object
org.fusesource.hawtbuf.codec.VarIntegerCodec
- Direct Known Subclasses:
VarSignedIntegerCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead the payload of the object from the DataInput stream.voidencode(Integer x, DataOutput dataOut) Write the payload of the object to the DataOutput stream.intintbooleanboolean
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
VarIntegerCodec
public VarIntegerCodec()
-
-
Method Details
-
encode
Description copied from interface:CodecWrite the payload of the object to the DataOutput stream.- Specified by:
encodein interfaceCodec<Integer>- Parameters:
x-dataOut-- Throws:
IOException
-
decode
Description copied from interface:CodecRead the payload of the object from the DataInput stream.- Specified by:
decodein interfaceCodec<Integer>- Parameters:
dataIn-- Returns:
- unmarshalled object
- Throws:
IOException
-
getFixedSize
public int getFixedSize()- Specified by:
getFixedSizein interfaceCodec<Integer>- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-
deepCopy
-
isDeepCopySupported
public boolean isDeepCopySupported()- Specified by:
isDeepCopySupportedin interfaceCodec<Integer>- Returns:
- true if the
Codec.deepCopy(Object)operations is supported.
-
isEstimatedSizeSupported
public boolean isEstimatedSizeSupported()- Specified by:
isEstimatedSizeSupportedin interfaceCodec<Integer>- Returns:
- true if the
Codec.estimatedSize(Object)operation is supported.
-
estimatedSize
- Specified by:
estimatedSizein interfaceCodec<Integer>- Parameters:
x-- Returns:
- the estimated marshaled size of the object.
-