public abstract class GridAbstractMarshaller extends Object implements GridMarshaller
GridByteArrayList. These implementations
use GridByteArrayInputStream or GridByteArrayOutputStream
to marshal and unmarshal objects.| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_BUFFER_SIZE
Default initial buffer size for the
GridByteArrayOutputStream. |
| Constructor and Description |
|---|
GridAbstractMarshaller() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
marshal(Object obj)
Marshals object to byte array.
|
<T> T |
unmarshal(byte[] arr,
ClassLoader clsLdr)
Unmarshals object from byte array using given class loader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarshal, unmarshalpublic static final int DFLT_BUFFER_SIZE
GridByteArrayOutputStream.public byte[] marshal(@Nullable Object obj) throws GridException
marshal in interface GridMarshallerobj - Object to marshal.GridException - If marshalling failed.public <T> T unmarshal(byte[] arr,
@Nullable
ClassLoader clsLdr)
throws GridException
unmarshal in interface GridMarshallerT - Type of unmarshalled object.arr - Byte array.clsLdr - Class loader to use.GridException - If unmarshalling failed.Copyright © 2014. All rights reserved.