org.apache.kahadb.util
Class IntegerMarshaller
java.lang.Object
org.apache.kahadb.util.IntegerMarshaller
- All Implemented Interfaces:
- Marshaller<Integer>
public class IntegerMarshaller
- extends Object
- implements Marshaller<Integer>
Implementation of a Marshaller for a Integer
- 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 IntegerMarshaller INSTANCE
IntegerMarshaller
public IntegerMarshaller()
writePayload
public void writePayload(Integer object,
DataOutput dataOut)
throws IOException
- Description copied from interface:
Marshaller
- Write the payload of the object to the DataOutput stream.
- Specified by:
writePayload
in interface Marshaller<Integer>
- Throws:
IOException
readPayload
public Integer readPayload(DataInput dataIn)
throws IOException
- Description copied from interface:
Marshaller
- Read the payload of the object from the DataInput stream.
- Specified by:
readPayload
in interface Marshaller<Integer>
- Returns:
- unmarshalled object
- Throws:
IOException
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSize
in interface Marshaller<Integer>
- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
deepCopy
public Integer deepCopy(Integer source)
- Specified by:
deepCopy
in interface Marshaller<Integer>
- Returns:
- the source object since integers are immutable.
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupported
in interface Marshaller<Integer>
- Returns:
- true if the
Marshaller.deepCopy(Object)
operations is supported.
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.