public class ProtoStreamMarshaller extends AbstractMarshaller
Marshaller that uses Protobuf
encoding.marshallableTypeHints| Constructor and Description |
|---|
ProtoStreamMarshaller() |
ProtoStreamMarshaller(org.infinispan.protostream.SerializationContext serializationContext) |
| Modifier and Type | Method and Description |
|---|---|
org.infinispan.protostream.SerializationContext |
getSerializationContext() |
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. |
void |
register(org.infinispan.protostream.SerializationContextInitializer initializer) |
getBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBufferclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, start, stoppublic ProtoStreamMarshaller()
public ProtoStreamMarshaller(org.infinispan.protostream.SerializationContext serializationContext)
public void register(org.infinispan.protostream.SerializationContextInitializer initializer)
public org.infinispan.protostream.SerializationContext getSerializationContext()
public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, 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 considerIOException - if unmarshalling cannot complete due to some I/O errorClassNotFoundException - if the class of the object trying to unmarshall is unknownpublic boolean isMarshallable(Object o)
Marshallero - object to verify whether it's marshallable or notprotected ByteBuffer objectToBuffer(Object o, int estimatedSize) throws IOException
AbstractMarshallerByteBuffer which takes
an estimated size as parameter. A 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 beIOExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.