|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface ObjectSerializer
Instances of this class are used to serialize or deserialize objects to or from an array of bytes.
A specific use of this class is that it can be loaded by a new classloader, making the execution transparent
to any change in the client code.
| Method Summary | |
|---|---|
Object |
deserialize(byte[] bytes)
Read an object from an array of bytes. |
Object |
deserialize(byte[] bytes,
int offset,
int length)
Read an object from an array of bytes. |
Object |
deserialize(InputStream is)
Read an object from an input stream. |
Object |
deserialize(JPPFBuffer buf)
Read an object from an array of bytes. |
JPPFBuffer |
serialize(Object o)
Serialize an object into an array of bytes. |
JPPFBuffer |
serialize(Object o,
boolean noCopy)
Serialize an object into an array of bytes. |
void |
serialize(Object o,
OutputStream os)
Serialize an object into an output stream. |
| Method Detail |
|---|
JPPFBuffer serialize(Object o)
throws Exception
o - the object to Serialize.
JPPFBuffer instance holding the serialized object.
Exception - if the object can't be serialized.
JPPFBuffer serialize(Object o,
boolean noCopy)
throws Exception
o - the object to Serialize.noCopy - avoid copying intermediate buffers.
JPPFBuffer instance holding the serialized object.
Exception - if the object can't be serialized.
void serialize(Object o,
OutputStream os)
throws Exception
o - the object to Serialize.os - the output stream to serialize to.
Exception - if the object can't be serialized.
Object deserialize(JPPFBuffer buf)
throws Exception
buf - buffer holding the array of bytes to deserialize from.
Exception - the class of the deserialized object could not be found.
Object deserialize(byte[] bytes)
throws Exception
bytes - buffer holding the array of bytes to deserialize from.
Exception - if the ObjectInputStream used for deserialization raises an error.
Object deserialize(byte[] bytes,
int offset,
int length)
throws Exception
bytes - buffer holding the array of bytes to deserialize from.offset - position at which to start reading the bytes from.length - the number of bytes to read.
Exception - if the ObjectInputStream used for deserialization raises an error.
Object deserialize(InputStream is)
throws Exception
is - - the input stream to deserialize from.
Exception - if the ObjectInputStream used for deserialization raises an error.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||