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)
RedisCodec
decodeKey
in class RedisCodec<String,String>
bytes
- Raw bytes of the key, must not be null.public String decodeValue(ByteBuffer bytes)
RedisCodec
decodeValue
in class RedisCodec<String,String>
bytes
- Raw bytes of the value, must not be null.public byte[] encodeKey(String key)
RedisCodec
encodeKey
in class RedisCodec<String,String>
key
- the key, may be null.public byte[] encodeValue(String value)
RedisCodec
encodeValue
in class RedisCodec<String,String>
value
- the value, may be null.Copyright © 2016. All rights reserved.