Class BytesMarshaller
java.lang.Object
org.apache.activemq.store.kahadb.disk.util.BytesMarshaller
- All Implemented Interfaces:
Marshaller<byte[]>
Implementation of a Marshaller for byte arrays
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]deepCopy(byte[] source) intbooleanbyte[]readPayload(DataInput dataIn) Read the payload of the object from the DataInput stream.voidwritePayload(byte[] data, DataOutput dataOut) Write the payload of the object to the DataOutput stream.
-
Constructor Details
-
BytesMarshaller
public BytesMarshaller()
-
-
Method Details
-
writePayload
Description copied from interface:MarshallerWrite the payload of the object to the DataOutput stream.- Specified by:
writePayloadin interfaceMarshaller<byte[]>- Throws:
IOException
-
readPayload
Description copied from interface:MarshallerRead the payload of the object from the DataInput stream.- Specified by:
readPayloadin interfaceMarshaller<byte[]>- Returns:
- unmarshalled object
- Throws:
IOException
-
getFixedSize
public int getFixedSize()- Specified by:
getFixedSizein interfaceMarshaller<byte[]>- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
-
deepCopy
public byte[] deepCopy(byte[] source) - Specified by:
deepCopyin interfaceMarshaller<byte[]>- Returns:
- a deep copy of the source object.
-
isDeepCopySupported
public boolean isDeepCopySupported()- Specified by:
isDeepCopySupportedin interfaceMarshaller<byte[]>- Returns:
- true if the
Marshaller.deepCopy(Object)operations is supported.
-