Package org.hippoecm.repository.api
Interface StringCodec
- All Known Implementing Classes:
StringCodecFactory.IdentEncoding
,StringCodecFactory.ISO9075Helper
,StringCodecFactory.NameEncoding
,StringCodecFactory.UriEncoding
public interface StringCodec
Strategy interface for encoding and decoding strings.
StringCodec objects should not retain state between calls and are therefore reusable.
Encoding and decoding should also be thread-safe.
-
Method Summary
-
Method Details
-
encode
Encodes a string of characters.- Parameters:
plain
- the string to encode- Returns:
- the encoded string
-
decode
Decodes a string of characters. Some encoding strategies are one-way, in which case the decoding might return null.- Parameters:
encoded
- the previously encoded string- Returns:
- the decoded string or null if no decoding is possible
-