public int peekNext() throws NoSuchElementException { final int v = iter.peekNext(); return v > 255 ? '?' : v; }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) throw new NoSuchElementException(); return iter.peekNext(); }
public boolean hasNext() { return iter.hasNext() && ! isDelim(iter.peekNext()); }
public int peekNext() throws NoSuchElementException { if (! iter.hasNext()) { throw new NoSuchElementException(); } int next = seekNext(iter.peekNext()); if (! skip(next)) { return next; } return next; }
static String[] realmListPropertyToArray(String realmList, int escapeCharacter, int... delims) { if (realmList == null) { return null; } final int[] escapeCharacterAndDelims = Arrays.copyOf(delims, delims.length + 1); escapeCharacterAndDelims[escapeCharacterAndDelims.length - 1] = escapeCharacter; final CodePointIterator cpi = CodePointIterator.ofString(realmList); final CodePointIterator di = cpi.delimitedBy(escapeCharacterAndDelims); final ArrayList<String> realms = new ArrayList<>(); StringBuilder realm = new StringBuilder(); while (cpi.hasNext()) { if (di.hasNext()) { di.drainTo(realm); } else { if (cpi.peekNext() == escapeCharacter) { cpi.next(); // skip the escape character if (cpi.hasNext()) { realm.append((char) cpi.next()); } } else { // reached the end of a realm name realms.add(realm.toString()); skipDelims(di, cpi, delims); realm = new StringBuilder(); } } } realms.add(realm.toString()); return realms.toArray(new String[realms.size()]); }
/** * 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 (i.e. the code point * returned by {@link #next()} will be the differing code point. 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(CodePointIterator other) { for (;;) { if (hasNext()) { if (! other.hasNext()) { return false; } if (peekNext() != other.peekNext()) { return false; } next(); other.next(); } else { return ! other.hasNext(); } } }
private static void skipDelims(CodePointIterator di, CodePointIterator cpi, int... delims) { while ((! di.hasNext()) && cpi.hasNext() && isDelim(cpi.peekNext(), delims)) { cpi.next(); } } }
if (r.hasNext() && r.peekNext() != '$') { throw log.invalidKeySpecCostMustBeTwoDigitInteger();
throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string); if (i.hasNext() && isNameChar(i.peekNext())) { throw sasl.mechSelectorUnexpectedChar(cp, i.getIndex(), string);
public int peekNext() throws NoSuchElementException { final int v = iter.peekNext(); return v > 255 ? '?' : v; }
public int peekNext() throws NoSuchElementException { final int v = iter.peekNext(); return v > 255 ? '?' : v; }
public int peekNext() throws NoSuchElementException { if (! hasNext()) throw new NoSuchElementException(); return iter.peekNext(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int peekNext() throws NoSuchElementException { if (! hasNext()) { throw new NoSuchElementException(); } return iter.peekNext(); }
public int peekNext() throws NoSuchElementException { if (! iter.hasNext()) { throw new NoSuchElementException(); } int next = seekNext(iter.peekNext()); if (! skip(next)) { return next; } return next; }
public int peekNext() throws NoSuchElementException { if (! iter.hasNext()) { throw new NoSuchElementException(); } int next = seekNext(iter.peekNext()); if (! skip(next)) { return next; } return next; }
private static void skipDelims(CodePointIterator di, CodePointIterator cpi, int... delims) { while ((! di.hasNext()) && cpi.hasNext() && isDelim(cpi.peekNext(), delims)) { cpi.next(); } } }
private static void skipDelims(CodePointIterator di, CodePointIterator cpi, int... delims) { while ((! di.hasNext()) && cpi.hasNext() && isDelim(cpi.peekNext(), delims)) { cpi.next(); } } }
private static void skipDelims(CodePointIterator di, CodePointIterator cpi, int... delims) { while ((! di.hasNext()) && cpi.hasNext() && isDelim(cpi.peekNext(), delims)) { cpi.next(); } } }