public class Utf8StringCodec extends Object implements RedisCodec<String,String>
RedisCodec that handles UTF-8 encoded keys and values.| Constructor and Description |
|---|
Utf8StringCodec()
Initialize a new instance that encodes and decodes strings using the UTF-8 charset;
|
| Modifier and Type | Method and Description |
|---|---|
String |
decodeKey(ByteBuffer bytes)
Decode the key output by redis.
|
String |
decodeValue(ByteBuffer bytes)
Decode the value output by redis.
|
ByteBuffer |
encodeKey(String key)
Encode the key for output to redis.
|
ByteBuffer |
encodeValue(String value)
Encode the value for output to redis.
|
public Utf8StringCodec()
public String decodeKey(ByteBuffer bytes)
RedisCodecdecodeKey in interface RedisCodec<String,String>bytes - Raw bytes of the key, must not be null.public String decodeValue(ByteBuffer bytes)
RedisCodecdecodeValue in interface RedisCodec<String,String>bytes - Raw bytes of the value, must not be null.public ByteBuffer encodeKey(String key)
RedisCodecencodeKey in interface RedisCodec<String,String>key - the key, may be null.public ByteBuffer encodeValue(String value)
RedisCodecencodeValue in interface RedisCodec<String,String>value - the value, may be null.Copyright © 2018 lettuce.io. All rights reserved.