org.apache.kahadb.util
Class StringMarshaller
java.lang.Object
org.apache.kahadb.util.StringMarshaller
- All Implemented Interfaces:
- Marshaller<String>
public class StringMarshaller
- extends Object
- implements Marshaller<String>
Implementation of a Marshaller for Strings
- Version:
- $Revision: 816280 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final StringMarshaller INSTANCE
StringMarshaller
public StringMarshaller()
writePayload
public void writePayload(String object,
DataOutput dataOut)
throws IOException
- Write the payload of this entry to the RawContainer
- Specified by:
writePayload
in interface Marshaller<String>
- Parameters:
object
- dataOut
-
- Throws:
IOException
readPayload
public String readPayload(DataInput dataIn)
throws IOException
- Read the entry from the RawContainer
- Specified by:
readPayload
in interface Marshaller<String>
- Parameters:
dataIn
-
- Returns:
- unmarshalled object
- Throws:
IOException
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSize
in interface Marshaller<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:
deepCopy
in interface Marshaller<String>
- Returns:
- a deep copy of the source object.
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupported
in interface Marshaller<String>
- Returns:
- true if the
Marshaller.deepCopy(Object)
operations is supported.
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.