public class ByteArrayCodec extends RedisCodec<byte[],byte[]>
RedisCodec that uses plain byte arrays.| Modifier and Type | Field and Description |
|---|---|
static ByteArrayCodec |
INSTANCE
Static held instance ready to use.
|
| Constructor and Description |
|---|
ByteArrayCodec() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decodeKey(ByteBuffer bytes)
Decode the key output by redis.
|
byte[] |
decodeValue(ByteBuffer bytes)
Decode the value output by redis.
|
byte[] |
encodeKey(byte[] key)
Encode the key for output to redis.
|
byte[] |
encodeValue(byte[] value)
Encode the value for output to redis.
|
public static final ByteArrayCodec INSTANCE
ByteArrayCodec is thread-safe.public byte[] decodeKey(ByteBuffer bytes)
RedisCodecdecodeKey in class RedisCodec<byte[],byte[]>bytes - Raw bytes of the key.public byte[] decodeValue(ByteBuffer bytes)
RedisCodecdecodeValue in class RedisCodec<byte[],byte[]>bytes - Raw bytes of the value.public byte[] encodeKey(byte[] key)
RedisCodecencodeKey in class RedisCodec<byte[],byte[]>key - Key.public byte[] encodeValue(byte[] value)
RedisCodecencodeValue in class RedisCodec<byte[],byte[]>value - Value.Copyright © 2016. All rights reserved.