public class ArrayByteIterator extends Object implements ByteIterator
Constructor and Description |
---|
ArrayByteIterator(byte[] bytes)
Constructs a new byte iterator of the array
bytes . |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Byte |
next() |
byte |
nextByte()
Returns the next byte from the sequence and increments the byte position.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ArrayByteIterator(byte[] bytes)
bytes
.bytes
- the byte iterator to iterate over, must not be null
NullPointerException
- if bytes
is null
public byte nextByte()
ByteIterator
When there is no next byte to be read from the stream, this method throws
a NoSuchElementException
. Use Iterator.hasNext()
to detect this condition.
nextByte
in interface ByteIterator
Copyright © 2016. All rights reserved.