Enhanced ByteString implementation using ByteIterator

This commit is contained in:
Oliver Schulz 2012-05-01 19:22:16 +02:00
parent 76dab6354e
commit c8d7c995db
2 changed files with 31 additions and 79 deletions

View file

@ -143,7 +143,7 @@ class ByteArrayIterator private (private var array: Array[Byte], private var fro
def clear() { this.array = ByteArrayIterator.emptyArray; from = 0; until = from }
final override def length = { val l = len; drop(len); l }
final override def length = { val l = len; clear(); l }
final override def ++(that: TraversableOnce[Byte]) = that match {
case that: ByteArrayIterator {