public class Utf8StringCodec extends 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.
|
byte[] |
encodeKey(String key)
Encode the key for output to redis.
|
byte[] |
encodeValue(String value)
Encode the value for output to redis.
|
public Utf8StringCodec()
public String decodeKey(ByteBuffer bytes)
RedisCodecdecodeKey in class RedisCodec<String,String>bytes - Raw bytes of the key.public String decodeValue(ByteBuffer bytes)
RedisCodecdecodeValue in class RedisCodec<String,String>bytes - Raw bytes of the value.public byte[] encodeKey(String key)
RedisCodecencodeKey in class RedisCodec<String,String>key - Key.public byte[] encodeValue(String value)
RedisCodecencodeValue in class RedisCodec<String,String>value - Value.Copyright © 2016. All rights reserved.