public final class StringKeyConverter extends Object implements KeyConverter<String>
Constructor and Description |
---|
StringKeyConverter() |
Modifier and Type | Method and Description |
---|---|
String |
decode(byte[] bytes)
Decodes a byte array and returns a key of type T.
|
byte[] |
encode(String key)
Encodes a key as a byte array.
|
public byte[] encode(String key)
KeyConverter
encode
in interface KeyConverter<String>
key
- key to be encoded.public String decode(byte[] bytes)
KeyConverter
decode
in interface KeyConverter<String>
bytes
- byte representationCopyright © 2008–2022 Apache Software Foundation. All rights reserved.