public class BinarySerializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static List<ITraverseProcessor> |
ENCODER_HANDLERS
Handlers for encoding.
|
| Constructor and Description |
|---|
BinarySerializer() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
objectFromByteArray(byte[] val,
List<IDecoderHandler> postprocessors,
Object usercontext,
ClassLoader classloader,
IErrorReporter errorreporter)
Convert a byte array to an object.
|
static Object |
objectFromByteArrayInputStream(ByteArrayInputStream bais,
List<IDecoderHandler> postprocessors,
Object usercontext,
ClassLoader classloader,
IErrorReporter errorreporter)
Convert a byte array to an object.
|
static byte[] |
objectToByteArray(Object val,
List<ITraverseProcessor> preprocessors,
Object usercontext,
ClassLoader classloader)
Convert an object to an encoded byte array.
|
public static final List<ITraverseProcessor> ENCODER_HANDLERS
public static byte[] objectToByteArray(Object val, List<ITraverseProcessor> preprocessors, Object usercontext, ClassLoader classloader)
val - The object being encoded.preprocessors - List of processors called before the object is encoded, may be null.usercontext - A user context, may be null.classloader - The class loader used.public static Object objectFromByteArray(byte[] val, List<IDecoderHandler> postprocessors, Object usercontext, ClassLoader classloader, IErrorReporter errorreporter)
val - The byte array.usercontext - A user context, may be null.classloader - The class loader.errorreporter - The error reporter, may be null in which case the default reporter is used.public static Object objectFromByteArrayInputStream(ByteArrayInputStream bais, List<IDecoderHandler> postprocessors, Object usercontext, ClassLoader classloader, IErrorReporter errorreporter)
val - The byte array.usercontext - A user context, may be null.classloader - The class loader.errorreporter - The error reporter, may be null in which case the default reporter is used.Copyright © 2012. All Rights Reserved.