|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The type of the object being serialized and deserialized.public interface Serializer<T>
A Serializer
converts objects to raw binary data and vice versa, enabling persistent storage
of objects to files, HTTP cookies, or other mechanism.
Serializer
should only do conversion, never change the data, such as encoding/decoding or
encryption. These orthogonal concerns are handled elsewhere by Shiro, for example, via
CodecSupport
and CipherService
s.
Method Summary | |
---|---|
T |
deserialize(byte[] serialized)
Converts the specified raw byte[] array back into an original Object form. |
byte[] |
serialize(T o)
Converts the specified Object into a byte[] array. |
Method Detail |
---|
byte[] serialize(T o) throws SerializationException
deserialize
method.
o
- the Object to convert into a byte[] array.
SerializationException
- if an error occurrs converting the Object into a byte[] array.T deserialize(byte[] serialized) throws SerializationException
serialize
method call.
serialized
- the raw data resulting from a previous serialize
call.
SerializationException
- if an error occurrs converting the raw byte[] array back into an Object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |