* @return the byte[]
*/
public static byte[] encode(final String str) {
try {
if (str == null) {
throw new RedisCacheException("value sent to redis cannot be null");
}
return str.getBytes(Protocol.CHARSET);
} catch (UnsupportedEncodingException e) {
throw new RedisCacheException(e);
}
}