public class PersistentPropertyDataEncoderImpl extends java.lang.Object implements PersistentPropertyDataEncoder
PropertyChange
s back and
forth to a URL safe encoded string.
A possible improvement would be to encode the binary data with encryption both on and off, and select the shortest (prefixing with a character that identifies whether encryption should be used to decode).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BYTESTREAM_PREFIX
Prefix on the MIME encoding that indicates that the encoded data is not encoded.
|
static java.lang.String |
GZIP_BYTESTREAM_PREFIX
Prefix on the MIME encoding that indicates that the encoded data is encoded with GZIP.
|
Constructor and Description |
---|
PersistentPropertyDataEncoderImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.List |
decodePageChanges(java.lang.String encoded)
Takes a string with an encoded set of page changes, and converts it back into a list of
PropertyChange s. |
java.lang.String |
encodePageChanges(java.util.List changes)
Encodes a (possibly empty) list of
PropertyChange s into a string representation that
can later be decoded. |
void |
setClassResolver(org.apache.hivemind.ClassResolver resolver) |
public static final java.lang.String BYTESTREAM_PREFIX
public static final java.lang.String GZIP_BYTESTREAM_PREFIX
public PersistentPropertyDataEncoderImpl()
public java.lang.String encodePageChanges(java.util.List changes)
PersistentPropertyDataEncoder
PropertyChange
s into a string representation that
can later be decoded.encodePageChanges
in interface PersistentPropertyDataEncoder
public java.util.List decodePageChanges(java.lang.String encoded)
PersistentPropertyDataEncoder
PropertyChange
s.decodePageChanges
in interface PersistentPropertyDataEncoder
public void setClassResolver(org.apache.hivemind.ClassResolver resolver)