|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.expasy.jpl.commons.base.io.Serializer<T>
T - the type to (de)serializepublic final class Serializer<T extends Serializable>
The serializer just handles (de)serialization of objects T.
| Constructor Summary | |
|---|---|
Serializer()
|
|
| Method Summary | ||
|---|---|---|
T |
deserialize(byte[] bytes)
Deserializes a T-object from an array of bytes. |
|
T |
deserialize(ByteBuffer buf)
Deserializes a T-object from a ByteBuffer. |
|
T |
deserialize(String filename)
|
|
static
|
newInstance()
|
|
byte[] |
serialize(T obj)
Serializes a T-object. |
|
void |
serialize(T obj,
String filename)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Serializer()
| Method Detail |
|---|
public static <T extends Serializable> Serializer<T> newInstance()
public void serialize(T obj,
String filename)
throws IOException
IOException
public T deserialize(String filename)
throws IOException
IOException
public byte[] serialize(T obj)
throws IOException
obj - the object to serialize.
IOException
public T deserialize(byte[] bytes)
throws IOException
bytes - the array of bytes.
IOException
public T deserialize(ByteBuffer buf)
throws IOException
T - the object type.buf - the byte buffer.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||