public class SBinarySerializer2
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.util.List<IDecoderHandler> |
DECODER_HANDLERS
Handlers for decoding.
|
static java.util.List<ITraverseProcessor> |
ENCODER_HANDLERS
Handlers for encoding.
|
protected static byte |
MAGIC_BYTE
The magic byte identifying it as a binary serializer 2 stream.
|
protected static java.lang.String |
NULL_MARKER
Marker for null values
|
protected static java.lang.String |
REFERENCE_MARKER
Marker for references
|
protected static int |
VERSION
Serializer version
|
Constructor and Description |
---|
SBinarySerializer2() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
readObjectFromDataInput(java.io.DataInput di,
java.util.List<IDecoderHandler> postprocessors,
java.lang.Object usercontext,
java.lang.ClassLoader classloader,
IErrorReporter errorreporter)
Convert a byte array to an object.
|
static java.lang.Object |
readObjectFromStream(java.io.InputStream is,
java.util.List<IDecoderHandler> postprocessors,
java.lang.Object usercontext,
java.lang.ClassLoader classloader,
IErrorReporter errorreporter)
Convert a byte array to an object.
|
static long |
writeObjectToDataOutput(java.io.DataOutput dato,
java.lang.Object val,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
static long |
writeObjectToDataOutput(java.io.DataOutput dato,
java.lang.Object val,
java.util.List<ITraverseProcessor> preprocessors,
java.util.List<ITraverseProcessor> encoderhandlers,
java.lang.Object usercontext,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
static long |
writeObjectToDataOutput(java.io.DataOutput dato,
java.lang.Object val,
java.util.List<ITraverseProcessor> preprocessors,
java.lang.Object usercontext,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
static long |
writeObjectToStream(java.io.OutputStream os,
java.lang.Object val,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
static long |
writeObjectToStream(java.io.OutputStream os,
java.lang.Object val,
java.util.List<ITraverseProcessor> preprocessors,
java.util.List<ITraverseProcessor> encoderhandlers,
java.lang.Object usercontext,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
static long |
writeObjectToStream(java.io.OutputStream os,
java.lang.Object val,
java.util.List<ITraverseProcessor> preprocessors,
java.lang.Object usercontext,
java.lang.ClassLoader classloader)
Convert an object to an encoded byte array.
|
protected static final byte MAGIC_BYTE
protected static final int VERSION
protected static final java.lang.String NULL_MARKER
protected static final java.lang.String REFERENCE_MARKER
public static final java.util.List<ITraverseProcessor> ENCODER_HANDLERS
protected static final java.util.List<IDecoderHandler> DECODER_HANDLERS
public static long writeObjectToStream(java.io.OutputStream os, java.lang.Object val, java.lang.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 long writeObjectToStream(java.io.OutputStream os, java.lang.Object val, java.util.List<ITraverseProcessor> preprocessors, java.lang.Object usercontext, java.lang.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 long writeObjectToStream(java.io.OutputStream os, java.lang.Object val, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> encoderhandlers, java.lang.Object usercontext, java.lang.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 long writeObjectToDataOutput(java.io.DataOutput dato, java.lang.Object val, java.lang.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 long writeObjectToDataOutput(java.io.DataOutput dato, java.lang.Object val, java.util.List<ITraverseProcessor> preprocessors, java.lang.Object usercontext, java.lang.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 long writeObjectToDataOutput(java.io.DataOutput dato, java.lang.Object val, java.util.List<ITraverseProcessor> preprocessors, java.util.List<ITraverseProcessor> encoderhandlers, java.lang.Object usercontext, java.lang.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 java.lang.Object readObjectFromStream(java.io.InputStream is, java.util.List<IDecoderHandler> postprocessors, java.lang.Object usercontext, java.lang.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 java.lang.Object readObjectFromDataInput(java.io.DataInput di, java.util.List<IDecoderHandler> postprocessors, java.lang.Object usercontext, java.lang.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.