|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.util.io.SerializableAdaptor
public class SerializableAdaptor
The most complicated of the adaptors, this one takes an arbitrary serializable object, serializes it to binary (possibly compressing the stream along the way), and encodes it in a Base64 encoding. The first character of the squeezed stream indicates whether it is or is not encoded.
Constructor Summary | |
---|---|
SerializableAdaptor()
|
Method Summary | |
---|---|
Class |
getDataClass()
Returns the class (or interface) which can be encoded by this adaptor. |
String |
getPrefix()
Returns one or more characters, each of which will be a prefix for this adaptor. |
void |
setResolver(org.apache.hivemind.ClassResolver resolver)
|
String |
squeeze(DataSqueezer squeezer,
Object data)
Converts the data object into a String. |
Object |
unsqueeze(DataSqueezer squeezer,
String encoded)
Converts a String back into an appropriate object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializableAdaptor()
Method Detail |
---|
public String getPrefix()
SqueezeAdaptor
getPrefix
in interface SqueezeAdaptor
public Class getDataClass()
SqueezeAdaptor
getDataClass
in interface SqueezeAdaptor
public String squeeze(DataSqueezer squeezer, Object data)
SqueezeAdaptor
squeeze
in interface SqueezeAdaptor
squeezer
- The squeezer that should be used to ultimately squeeze the data.data
- The data to squeeze.
public Object unsqueeze(DataSqueezer squeezer, String encoded)
SqueezeAdaptor
unsqueeze
in interface SqueezeAdaptor
squeezer
- The squeezer to use to unsqueeze the data.encoded
- The string data - as was returned from SqueezeAdaptor.squeeze(org.apache.tapestry.services.DataSqueezer, Object)
.
public void setResolver(org.apache.hivemind.ClassResolver resolver)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |