org.infinispan.marshall.jboss
Class GenericJBossMarshaller
java.lang.Object
org.infinispan.marshall.AbstractMarshaller
org.infinispan.marshall.jboss.GenericJBossMarshaller
- All Implemented Interfaces:
- Marshaller
- Direct Known Subclasses:
- JBossMarshaller
public class GenericJBossMarshaller
- extends AbstractMarshaller
A marshaller that makes use of JBoss Marshalling to serialize
and deserialize objects.
In addition to making use of JBoss Marshalling, this Marshaller
- Version:
- 4.1
- Author:
- Manik Surtani
- See Also:
http://www.jboss.org/jbossmarshalling
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final Log log
DEFAULT_MARSHALLER_FACTORY
protected static final String DEFAULT_MARSHALLER_FACTORY
- See Also:
- Constant Field Values
defaultCl
protected ClassLoader defaultCl
configuration
protected org.jboss.marshalling.MarshallingConfiguration configuration
factory
protected org.jboss.marshalling.MarshallerFactory factory
GenericJBossMarshaller
public GenericJBossMarshaller()
objectToObjectStream
public void objectToObjectStream(Object obj,
ObjectOutput out)
throws IOException
- Throws:
IOException
objectToBuffer
protected ByteBuffer objectToBuffer(Object o,
int estimatedSize)
throws IOException
- Description copied from class:
AbstractMarshaller
- This is a convenience method for converting an object into a
ByteBuffer
which takes
an estimated size as parameter. A ByteBuffer
allows direct access to the byte
array with minimal array copying
- Specified by:
objectToBuffer
in class AbstractMarshaller
- Parameters:
o
- object to marshallestimatedSize
- an estimate of how large the resulting byte array may be
- Returns:
- a ByteBuffer
- Throws:
IOException
startObjectOutput
public ObjectOutput startObjectOutput(OutputStream os,
boolean isReentrant)
throws IOException
- Throws:
IOException
finishObjectOutput
public void finishObjectOutput(ObjectOutput oo)
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] buf,
int offset,
int length)
throws IOException,
ClassNotFoundException
- Description copied from interface:
Marshaller
- Unmarshalls 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 readinglength
- number of bytes to consider
- Returns:
- an object
- Throws:
IOException
ClassNotFoundException
startObjectInput
public ObjectInput startObjectInput(InputStream is,
boolean isReentrant)
throws IOException
- Throws:
IOException
objectFromObjectStream
public Object objectFromObjectStream(ObjectInput in)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
finishObjectInput
public void finishObjectInput(ObjectInput oi)
isMarshallable
public boolean isMarshallable(Object o)
- Description copied from interface:
Marshaller
- A 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
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.