public boolean hasNext() { return ByteIterator.this.hasNext(); }
public boolean hasNext() { return lo || ByteIterator.this.hasNext(); }
public boolean hasNext() { return ByteIterator.this.hasNext(); }
public boolean hasNext() { return offset < size && ByteIterator.this.hasNext(); }
public boolean hasNext() { return ByteIterator.this.hasNext(); }
public boolean hasNext() { return state == 0 && ByteIterator.this.hasNext() || state > 0 && state < 0x29; }
public boolean hasNext() { return ByteIterator.this.hasNext(); }
public boolean hasNext() { return state == 0 && ByteIterator.this.hasNext() || state > 0 && state < 0xd; }
/** * Drain all the remaining bytes in this iterator to the given stream. * * @param stream the stream * @return the same stream */ public ByteArrayOutputStream drainTo(ByteArrayOutputStream stream) { while (hasNext()) { stream.write(next()); } return stream; }
public int read() throws IOException { return hasNext() ? next() : -1; }
/** * Determine if the remaining contents of this iterator are identical to the remaining contents of the other iterator. If the * contents are not equal, the iterators will be positioned at the location of the first difference. If the contents * are equal, the iterators will both be positioned at the end of their contents. * * @param other the other byte iterator * @return {@code true} if the contents are equal, {@code false} otherwise */ public final boolean contentEquals(ByteIterator other) { for (;;) { if (hasNext()) { if (! other.hasNext()) { return false; } if (next() != other.next()) { return false; } } else { return ! other.hasNext(); } } }
/** * Drains up to {@code len} bytes from this iterator into the given {@code dst} array. * An attempt is made to drain as many as {@code len} bytes, but a smaller number may * be drained. * <p> * The number of bytes actually drained is returned as an integer. Unlike * {@link InputStream#read(byte[], int, int)}, this method never returns a negative result. * * @param dst the buffer into which the data is drained * @param offs the start offset in array {@code dst} at which the data is written. * @param len the maximum number of bytes to drain * @return the total number of bytes drained into {@code dst}, always greater or equal to {@code 0} */ public int drain(byte[] dst, int offs, int len) { for (int i = 0; i < len; i ++) { if (! hasNext()) return i; dst[offs + i] = (byte) next(); } return len; }
if (size <= 0 || ! hasNext()) { return EMPTY;
if ((delims == null) || (delims.length == 0) || ! hasNext()) { return EMPTY;
if (! hasNext()) { return CodePointIterator.EMPTY;
public boolean hasNext() { return ByteIterator.this.hasNext() && ! isDelim(ByteIterator.this.peekNext()); }
switch (state) { case 0: { assert ByteIterator.this.hasNext(); int b0 = ByteIterator.this.next(); c0 = calc0(b0); if (!ByteIterator.this.hasNext()) { c1 = calc1(b0, 0); state = 9; c1 = calc1(b0, b1); c2 = calc2(b1); if (!ByteIterator.this.hasNext()) { c3 = calc3(b1, 0); state = 0x11; if (!ByteIterator.this.hasNext()) { c4 = calc4(b2, 0); state = 0x19; c4 = calc4(b2, b3); c5 = calc5(b3); if (!ByteIterator.this.hasNext()) { c6 = calc6(b3, 0); state = 0x21;
switch (state) { case 0: { assert ByteIterator.this.hasNext(); int b0 = ByteIterator.this.next(); c0 = calc0(b0); if (!ByteIterator.this.hasNext()) { c1 = calc1(b0, 0); state = 0x0a; c1 = calc1(b0, b1); c2 = calc2(b1); if (!ByteIterator.this.hasNext()) { c3 = calc3(b1, 0); state = 0x12; if (!ByteIterator.this.hasNext()) { c4 = calc4(b2, 0); state = 0x1a; c4 = calc4(b2, b3); c5 = calc5(b3); if (!ByteIterator.this.hasNext()) { c6 = calc6(b3, 0); state = 0x22;