Add test of basic Redis-style key-value store

This commit is contained in:
Derek Williams 2011-05-27 22:52:06 -06:00
parent ec4e7f7b03
commit 8b166454bf
3 changed files with 99 additions and 18 deletions

View file

@ -93,6 +93,8 @@ final class ByteString private (bytes: Array[Byte], startIndex: Int, endIndex: I
def toByteBuffer: ByteBuffer = ByteBuffer.wrap(toArray)
def utf8String: String = new String(bytes, "UTF-8")
def mapI(f: Byte Int): ByteString = map(f andThen (_.toByte))
override def slice(from: Int, until: Int): ByteString = {