public interface EncoderDecoder
An encoder is usually paired with a decoder. It is not a requirement that the encoding is symmetrical. If the encoding is symmetrical the result of encoding and then decoding must be equal the original string and so must the result of decoding and then encoding.
It is up to the implementation how null values are handled. Some implementations
may not support null and may throw an exception. Note that null value handling must
also be symmetrical if isSymmetrical()
returns true.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
decode(java.lang.String s) |
java.lang.String |
encode(java.lang.String s) |
boolean |
isSymmetrical() |
boolean isSymmetrical()
java.lang.String encode(java.lang.String s)
s
- The string to encodejava.lang.String decode(java.lang.String s)
s
- The string to decode