normalized BinaryJedisCommands to match JedisCommands (including setbit)

This commit is contained in:
samhendley
2012-12-25 16:00:43 -05:00
parent 429e45081e
commit 2006d80ac5
10 changed files with 182 additions and 69 deletions

View File

@@ -131,6 +131,10 @@ public final class Protocol {
return process(is);
}
public static final byte[] toByteArray(final boolean value) {
return toByteArray(value ? 1 : 0);
}
public static final byte[] toByteArray(final int value) {
return SafeEncoder.encode(String.valueOf(value));
}