public class StringMarshaller extends AbstractMarshaller
marshallableTypeHints| Constructor and Description |
|---|
StringMarshaller(java.nio.charset.Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isMarshallable(java.lang.Object o)
A method that checks whether the given object is marshallable as per the rules of this marshaller.
|
MediaType |
mediaType() |
java.lang.Object |
objectFromByteBuffer(byte[] buf,
int offset,
int length)
Unmarshalls an object from a specific portion of a byte array.
|
protected ByteBuffer |
objectToBuffer(java.lang.Object o,
int estimatedSize)
This is a convenience method for converting an object into a
org.infinispan.io.ByteBuffer which takes
an estimated size as parameter. |
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBufferprotected ByteBuffer objectToBuffer(java.lang.Object o, int estimatedSize) throws java.io.IOException, java.lang.InterruptedException
AbstractMarshallerorg.infinispan.io.ByteBuffer which takes
an estimated size as parameter. A org.infinispan.io.ByteBuffer allows direct access to the byte
array with minimal array copyingobjectToBuffer in class AbstractMarshallero - object to marshallestimatedSize - an estimate of how large the resulting byte array may bejava.io.IOExceptionjava.lang.InterruptedExceptionpublic java.lang.Object objectFromByteBuffer(byte[] buf,
int offset,
int length)
throws java.io.IOException,
java.lang.ClassNotFoundException
Marshallerbuf - byte array containing the binary representation of an object. Must not be null.offset - point in buffer to start readinglength - number of bytes to considerjava.io.IOException - if unmarshalling cannot complete due to some I/O errorjava.lang.ClassNotFoundException - if the class of the object trying to unmarshall is unknownpublic boolean isMarshallable(java.lang.Object o)
throws java.lang.Exception
Marshallero - object to verify whether it's marshallable or notjava.lang.Exception - if while checking whether the object was serializable or not, an exception arose