Package org.fusesource.hawtbuf.codec
Class StringCodec
- java.lang.Object
-
- org.fusesource.hawtbuf.codec.StringCodec
-
-
Field Summary
Fields Modifier and Type Field Description static StringCodecINSTANCE
-
Constructor Summary
Constructors Constructor Description StringCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdecode(java.io.DataInput dataIn)Read the entry from the RawContainerjava.lang.StringdeepCopy(java.lang.String source)voidencode(java.lang.String object, java.io.DataOutput dataOut)Write the payload of this entry to the RawContainerintestimatedSize(java.lang.String object)intgetFixedSize()booleanisDeepCopySupported()booleanisEstimatedSizeSupported()
-
-
-
Field Detail
-
INSTANCE
public static final StringCodec INSTANCE
-
-
Method Detail
-
encode
public void encode(java.lang.String object, java.io.DataOutput dataOut) throws java.io.IOExceptionWrite the payload of this entry to the RawContainer
-
decode
public java.lang.String decode(java.io.DataInput dataIn) throws java.io.IOExceptionRead the entry from the RawContainer
-
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSizein interfaceCodec<java.lang.String>- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-
deepCopy
public java.lang.String deepCopy(java.lang.String source)
-
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupportedin interfaceCodec<java.lang.String>- Returns:
- true if the
Codec.deepCopy(Object)operations is supported.
-
isEstimatedSizeSupported
public boolean isEstimatedSizeSupported()
- Specified by:
isEstimatedSizeSupportedin interfaceCodec<java.lang.String>- Returns:
- true if the
Codec.estimatedSize(Object)operation is supported.
-
estimatedSize
public int estimatedSize(java.lang.String object)
- Specified by:
estimatedSizein interfaceCodec<java.lang.String>- Returns:
- the estimated marshaled size of the object.
-
-