|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.serialize.java.JavaSerializer
public class JavaSerializer
An implementation of ISerializer
based on Java Serialization (ObjectOutputStream,
ObjectInputStream)
Requires the application key to enable serialization and deserialisation outside thread in which
application thread local is set
Constructor Summary | |
---|---|
JavaSerializer(String applicationKey)
Construct. |
Method Summary | |
---|---|
Object |
deserialize(byte[] data)
Reconstructs the object from its serialized state |
protected ObjectInputStream |
newObjectInputStream(InputStream in)
Gets a new instance of an ObjectInputStream with the provided InputStream . |
protected ObjectOutputStream |
newObjectOutputStream(OutputStream out)
Gets a new instance of an ObjectOutputStream with the provided OutputStream . |
byte[] |
serialize(Object object)
Converts the object to byte array |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavaSerializer(String applicationKey)
applicationKey
- the name of the applicationMethod Detail |
---|
public byte[] serialize(Object object)
ISerializer
serialize
in interface ISerializer
object
- the object to serialize
public Object deserialize(byte[] data)
ISerializer
deserialize
in interface ISerializer
data
- the serialized state of the object
protected ObjectInputStream newObjectInputStream(InputStream in) throws IOException
ObjectInputStream
with the provided InputStream
.
in
- The input stream that should be used for the reading
IOException
- if an I/O error occurs while reading stream headerprotected ObjectOutputStream newObjectOutputStream(OutputStream out) throws IOException
ObjectOutputStream
with the provided OutputStream
.
out
- The output stream that should be used for the writing
IOException
- if an I/O error occurs while writing stream header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |