Package org.infinispan.commons.marshall
Class JavaSerializationMarshaller
- java.lang.Object
- 
- org.infinispan.commons.marshall.AbstractMarshaller
- 
- org.infinispan.commons.marshall.JavaSerializationMarshaller
 
 
- 
- All Implemented Interfaces:
- Marshaller
 
 public class JavaSerializationMarshaller extends AbstractMarshaller Standard Java serialization marshaller.- Since:
- 5.3
- Author:
- Galder ZamarreƱo
 
- 
- 
Field Summary- 
Fields inherited from class org.infinispan.commons.marshall.AbstractMarshallermarshallableTypeHints
 
- 
 - 
Constructor SummaryConstructors Constructor Description JavaSerializationMarshaller()JavaSerializationMarshaller(ClassWhiteList whiteList)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisMarshallable(Object o)A method that checks whether the given object is marshallable as per the rules of this marshaller.MediaTypemediaType()ObjectobjectFromByteBuffer(byte[] buf, int offset, int length)Unmarshalls an object from a specific portion of a byte array.protected ByteBufferobjectToBuffer(Object o, int estimatedSize)This is a convenience method for converting an object into aByteBufferwhich takes an estimated size as parameter.- 
Methods inherited from class org.infinispan.commons.marshall.AbstractMarshallergetBufferSizePredictor, objectFromByteBuffer, objectFromInputStream, objectToBuffer, objectToByteBuffer, objectToByteBuffer
 
- 
 
- 
- 
- 
Constructor Detail- 
JavaSerializationMarshallerpublic JavaSerializationMarshaller() 
 - 
JavaSerializationMarshallerpublic JavaSerializationMarshaller(ClassWhiteList whiteList) 
 
- 
 - 
Method Detail- 
objectToBufferprotected ByteBuffer objectToBuffer(Object o, int estimatedSize) throws IOException Description copied from class:AbstractMarshallerThis is a convenience method for converting an object into aByteBufferwhich takes an estimated size as parameter. AByteBufferallows direct access to the byte array with minimal array copying- Specified by:
- objectToBufferin class- AbstractMarshaller
- Parameters:
- o- object to marshall
- estimatedSize- an estimate of how large the resulting byte array may be
- Throws:
- IOException
 
 - 
objectFromByteBufferpublic Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException Description copied from interface:MarshallerUnmarshalls an object from a specific portion of a byte array.- Parameters:
- buf- byte array containing the binary representation of an object. Must not be null.
- offset- point in buffer to start reading
- length- number of bytes to consider
- Returns:
- an object
- Throws:
- IOException- if unmarshalling cannot complete due to some I/O error
- ClassNotFoundException- if the class of the object trying to unmarshall is unknown
 
 - 
isMarshallablepublic boolean isMarshallable(Object o) throws Exception Description copied from interface:MarshallerA method that checks whether the given object is marshallable as per the rules of this marshaller.- Parameters:
- o- object to verify whether it's marshallable or not
- Returns:
- true if the object is marshallable, otherwise false
- Throws:
- Exception- if while checking whether the object was serializable or not, an exception arose
 
 
- 
 
-