org.apache.kahadb.util
Class LongMarshaller
java.lang.Object
org.apache.kahadb.util.LongMarshaller
- All Implemented Interfaces:
- Marshaller<java.lang.Long>
public class LongMarshaller
- extends java.lang.Object
- implements Marshaller<java.lang.Long>
Implementation of a Marshaller for a Long
Method Summary |
java.lang.Long |
deepCopy(java.lang.Long source)
|
int |
getFixedSize()
|
boolean |
isDeepCopySupported()
|
java.lang.Long |
readPayload(java.io.DataInput dataIn)
Read the payload of the object from the DataInput stream. |
void |
writePayload(java.lang.Long object,
java.io.DataOutput dataOut)
Write the payload of the object to the DataOutput stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final LongMarshaller INSTANCE
LongMarshaller
public LongMarshaller()
writePayload
public void writePayload(java.lang.Long object,
java.io.DataOutput dataOut)
throws java.io.IOException
- Description copied from interface:
Marshaller
- Write the payload of the object to the DataOutput stream.
- Specified by:
writePayload
in interface Marshaller<java.lang.Long>
- Throws:
java.io.IOException
readPayload
public java.lang.Long readPayload(java.io.DataInput dataIn)
throws java.io.IOException
- Description copied from interface:
Marshaller
- Read the payload of the object from the DataInput stream.
- Specified by:
readPayload
in interface Marshaller<java.lang.Long>
- Returns:
- unmarshalled object
- Throws:
java.io.IOException
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSize
in interface Marshaller<java.lang.Long>
- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
deepCopy
public java.lang.Long deepCopy(java.lang.Long source)
- Specified by:
deepCopy
in interface Marshaller<java.lang.Long>
- Returns:
- a deep copy of the source object.
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupported
in interface Marshaller<java.lang.Long>
- Returns:
- true if the
Marshaller.deepCopy(Object)
operations is supported.
Copyright © 2005-2012. All Rights Reserved.