|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.io.SerializerUtil
public class SerializerUtil
Helper utilities for (de-)serialization of Serializable objects using
the Java serialization mechanisms.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
SerializerUtil()
|
|
| Method Summary | |
|---|---|
static Object |
deserialize(byte[] b)
De-serialize an object using the Java serialization mechansisms. |
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 mechansisms. |
static Object |
deserialize(InputStream is)
De-serialize an object using the Java serialization mechansisms. |
static byte[] |
serialize(Object obj)
Serialize an object using the Java serialization mechansims. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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.
| Constructor Detail |
|---|
public SerializerUtil()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||