Class StringCodec
java.lang.Object
org.fusesource.hawtbuf.codec.StringCodec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRead the entry from the RawContainervoidencode(String object, DataOutput dataOut) Write the payload of this entry to the RawContainerintestimatedSize(String object) intbooleanboolean
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
StringCodec
public StringCodec()
-
-
Method Details
-
encode
Write the payload of this entry to the RawContainer- Specified by:
encodein interfaceCodec<String>- Parameters:
object-dataOut-- Throws:
IOException
-
decode
Read the entry from the RawContainer- Specified by:
decodein interfaceCodec<String>- Parameters:
dataIn-- Returns:
- unmarshalled object
- Throws:
IOException
-
getFixedSize
public int getFixedSize()- Specified by:
getFixedSizein interfaceCodec<String>- 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<String>- Returns:
- true if the
Codec.deepCopy(Object)operations is supported.
-
isEstimatedSizeSupported
public boolean isEstimatedSizeSupported()- Specified by:
isEstimatedSizeSupportedin interfaceCodec<String>- Returns:
- true if the
Codec.estimatedSize(Object)operation is supported.
-
estimatedSize
- Specified by:
estimatedSizein interfaceCodec<String>- Parameters:
object-- Returns:
- the estimated marshaled size of the object.
-