public interface ByteIterator
Iterator
of byte
-values.Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
This method determines if there is a
next byte available. |
byte |
next()
This method gets the current byte in the iteration.
|
byte |
peek()
This method gets the current byte in the iteration.
|
long |
skip(long byteCount)
This method skips the number of bytes given by
byteCount . |
boolean hasNext()
next byte
available.true
if there is a next byte
available, false
otherwise (if the end of this
buffer has been reached).byte next() throws NoSuchElementException
ByteIterator
points
to the next byte in the iteration or to the end if there is no such byte available
. hasNext()
returns true
.NoSuchElementException
- if there is no such byte available
.Iterator.next()
byte peek() throws NoSuchElementException
next()
this method does NOT modify the state of
this ByteIterator
. Therefore the peeked byte does NOT get consumed and repetitive calls will return the
same value. hasNext()
returns true
.NoSuchElementException
- if there is no such byte available
.next()
long skip(long byteCount)
byteCount
.byteCount
- is the expected number of bytes to skip.byteCount
.
However the value may be less if the end of this iterator has been reached before the according number of
bytes have been skipped. The value will always be greater or equal to 0
.InputStream.skip(long)
Copyright © 2001–2016 mmm-Team. All rights reserved.