Enhanced ByteString implementation using ByteIterator
This commit is contained in:
parent
76dab6354e
commit
c8d7c995db
2 changed files with 31 additions and 79 deletions
|
|
@ -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 ⇒ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue