Adding support for bit commands get/setrange

This commit is contained in:
Eric Hauser
2011-02-22 22:41:46 -05:00
committed by Jonathan Leibiusky
parent e12f655fa3
commit 430601f31e
9 changed files with 73 additions and 2 deletions

View File

@@ -2616,4 +2616,14 @@ public class Jedis extends BinaryJedis implements JedisCommands {
client.getbit(key, offset);
return client.getIntegerReply() == 1;
}
public long setrange(String key, long offset, String value) {
client.setrange(key, offset, value);
return client.getIntegerReply();
}
public String getrange(String key, long startOffset, long endOffset) {
client.getrange(key, startOffset, endOffset);
return client.getBulkReply();
}
}