|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.marshall.AbstractMarshaller
public abstract class AbstractMarshaller
Abstract Marshaller implementation containing shared implementations.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_BUF_SIZE
|
| Constructor Summary | |
|---|---|
AbstractMarshaller()
|
|
| Method Summary | |
|---|---|
Object |
objectFromByteBuffer(byte[] buf)
Unmarshalls an object from a byte array. |
ByteBuffer |
objectToBuffer(Object obj)
A method that returns an instance of ByteBuffer, which allows direct access to the byte
array with minimal array copying |
protected abstract ByteBuffer |
objectToBuffer(Object o,
int estimatedSize)
This is a convenience method for converting an object into a ByteBuffer which takes
an estimated size as parameter. |
byte[] |
objectToByteBuffer(Object o)
Marshalls an object to a byte array. |
byte[] |
objectToByteBuffer(Object obj,
int estimatedSize)
Marshalls an object to a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.infinispan.marshall.Marshaller |
|---|
isMarshallable, objectFromByteBuffer |
| Field Detail |
|---|
protected static final int DEFAULT_BUF_SIZE
| Constructor Detail |
|---|
public AbstractMarshaller()
| Method Detail |
|---|
protected abstract ByteBuffer objectToBuffer(Object o,
int estimatedSize)
throws IOException
ByteBuffer which takes
an estimated size as parameter. A ByteBuffer allows direct access to the byte
array with minimal array copying
o - object to marshallestimatedSize - an estimate of how large the resulting byte array may be
Exception
IOException
public ByteBuffer objectToBuffer(Object obj)
throws IOException
MarshallerByteBuffer, which allows direct access to the byte
array with minimal array copying
objectToBuffer in interface Marshallerobj - object to marshall
IOException
public byte[] objectToByteBuffer(Object o)
throws IOException
Marshaller
objectToByteBuffer in interface Marshallero - object to convert to a byte array. Must not be null.
IOException
public byte[] objectToByteBuffer(Object obj,
int estimatedSize)
throws IOException
Marshaller
objectToByteBuffer in interface Marshallerobj - object to convert to a byte array. Must not be null.estimatedSize - an estimate of how large the resulting byte array may be
IOException
public Object objectFromByteBuffer(byte[] buf)
throws IOException,
ClassNotFoundException
Marshaller
objectFromByteBuffer in interface Marshallerbuf - byte array containing the binary representation of an object. Must not be null.
IOException
ClassNotFoundException
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||