Class StringMarshaller
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.util.StringMarshaller
-
- All Implemented Interfaces:
Marshaller<String>
public class StringMarshaller extends Object implements Marshaller<String>
Implementation of a Marshaller for Strings
-
-
Field Summary
Fields Modifier and Type Field Description static StringMarshallerINSTANCE
-
Constructor Summary
Constructors Constructor Description StringMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdeepCopy(String source)intgetFixedSize()booleanisDeepCopySupported()StringreadPayload(DataInput dataIn)Read the entry from the RawContainervoidwritePayload(String object, DataOutput dataOut)Write the payload of this entry to the RawContainer
-
-
-
Field Detail
-
INSTANCE
public static final StringMarshaller INSTANCE
-
-
Method Detail
-
writePayload
public void writePayload(String object, DataOutput dataOut) throws IOException
Write the payload of this entry to the RawContainer- Specified by:
writePayloadin interfaceMarshaller<String>- Parameters:
object-dataOut-- Throws:
IOException
-
readPayload
public String readPayload(DataInput dataIn) throws IOException
Read the entry from the RawContainer- Specified by:
readPayloadin interfaceMarshaller<String>- Parameters:
dataIn-- Returns:
- unmarshalled object
- Throws:
IOException
-
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSizein interfaceMarshaller<String>- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-
deepCopy
public String deepCopy(String source)
- Specified by:
deepCopyin interfaceMarshaller<String>- Returns:
- a deep copy of the source object.
-
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupportedin interfaceMarshaller<String>- Returns:
- true if the
Marshaller.deepCopy(Object)operations is supported.
-
-