public class IdentityMarshaller extends AbstractMarshaller
Modifier and Type | Field and Description |
---|---|
static IdentityMarshaller |
INSTANCE |
marshallableTypeHints
Constructor and Description |
---|
IdentityMarshaller() |
Modifier and Type | Method and Description |
---|---|
boolean |
isMarshallable(Object o)
A method that checks whether the given object is marshallable as per the rules of this marshaller.
|
MediaType |
mediaType() |
Object |
objectFromByteBuffer(byte[] buf,
int offset,
int length)
Unmarshalls an object from a specific portion of a byte array.
|
protected 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. |
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize, start, stop
public static final IdentityMarshaller INSTANCE
protected ByteBuffer objectToBuffer(Object o, int estimatedSize)
AbstractMarshaller
ByteBuffer
which takes
an estimated size as parameter. A ByteBuffer
allows direct access to the byte
array with minimal array copyingobjectToBuffer
in class AbstractMarshaller
o
- object to marshallestimatedSize
- an estimate of how large the resulting byte array may bepublic Object objectFromByteBuffer(byte[] buf, int offset, int length)
Marshaller
buf
- byte array containing the binary representation of an object. Must not be null.offset
- point in buffer to start readinglength
- number of bytes to considerpublic boolean isMarshallable(Object o)
Marshaller
o
- object to verify whether it's marshallable or notCopyright © 2021 JBoss by Red Hat. All rights reserved.