public class SerializerUtil extends Object
Serializable
objects using
the Java serialization mechanisms.Modifier and Type | Field and Description |
---|---|
static IRecordSerializer |
RECORDS
An
IRecordSerializer wrapper for the static methods declared by
the SerializerUtil . |
static IStreamSerializer |
STREAMS
An
IStreamSerializer that uses java default serialization. |
Constructor and Description |
---|
SerializerUtil() |
Modifier and Type | Method and Description |
---|---|
static Object |
deserialize(byte[] b)
De-serialize an object using the Java serialization mechanisms.
|
static Object |
deserialize(byte[] b,
int off,
int len)
De-serialize an object using the Java serialization mechanisms.
|
static Object |
deserialize(ByteBuffer buf)
De-serialize an object using the Java serialization mechanisms.
|
static Object |
deserialize(InputStream is)
De-serialize an object using the Java serialization mechanisms.
|
static byte[] |
serialize(Object obj)
Serialize an object using the Java serialization mechanisms.
|
public static final IStreamSerializer STREAMS
IStreamSerializer
that uses java default serialization.public static final IRecordSerializer RECORDS
IRecordSerializer
wrapper for the static methods declared by
the SerializerUtil
.public static final byte[] serialize(Object obj)
obj
- A Serializable
object.public static final Object deserialize(byte[] b)
b
- A byte[] containing a serialized object.null
iff the byte[]
reference is null
.public static final Object deserialize(byte[] b, int off, int len)
b
- A byte[] containing a serialized object.off
- The offset of the first byte to de-serialize.len
- The #of bytes in the object record.public static final Object deserialize(InputStream is)
is
- The input stream from which to read the serialized data.public static final Object deserialize(ByteBuffer buf)
buf
- A buffer containing a serialized object. The bytes from
Buffer.position()
to Buffer.limit()
will be de-serialized and the position will be advanced to the
limit.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.