public class LegacyStringKeyEncoder extends KeyEncoder<java.lang.String>
LegacyStringKeyEncoder
is an implementation of a KeyEncoder
for String
keys compatible
with the SOSS-JNC API.Constructor and Description |
---|
LegacyStringKeyEncoder(StringKeyCache stringKeyCache)
Construct a
KeyEncoder for String keys
compatible with the SOSS-JNC API. |
Modifier and Type | Method and Description |
---|---|
KeyEncodingResult |
encode(java.lang.String key)
Encodes the
String key into a KeyEncodingResult with a unicode encoded key string. |
java.lang.String |
fromBytes(byte[] keyAsBytes)
Retrieves a Unicode string from the 32-byte encoded key string.
|
public LegacyStringKeyEncoder(StringKeyCache stringKeyCache)
KeyEncoder
for String
keys
compatible with the SOSS-JNC API.stringKeyCache
- the string key cache.public java.lang.String fromBytes(byte[] keyAsBytes)
fromBytes
in class KeyEncoder<java.lang.String>
keyAsBytes
- the 32 byte encoded keypublic KeyEncodingResult encode(java.lang.String key)
String
key into a KeyEncodingResult
with a unicode encoded key string.encode
in class KeyEncoder<java.lang.String>
key
- the Integer
keyKeyEncodingResult