@Test public void safeNext() { int i = source.nextChar(); boolean ok = i == 'a' || die( "" + (char) i); i = source.nextChar(); ok = i == 'b' || die( "" + (char) i); i = source.nextChar(); ok = i == 'c' || die( "" + (char) i); try { i = source.nextChar(); die(); } catch ( RuntimeException aiobe ) { } }
@Override public final int nextChar() { ensureBuffer(); return ch = readBuf[index++]; }
ReaderCharacterSource implements CharacterSource { @Override public final int nextChar() { ensureBuffer(); return ch = readBuf[index++]; } }
ReaderCharacterSource implements CharacterSource { @Override public final int nextChar() { ensureBuffer(); return ch = readBuf[index++]; } ReaderCharacterSource( final Reader reader, final int readAheadSize);  ReaderCharacterSource( final Reader reader );  ReaderCharacterSource( final String string ); }
ReaderCharacterSource implements CharacterSource { @Override public final int nextChar() { ensureBuffer(); return ch = readBuf[index++]; } ReaderCharacterSource( final Reader reader, final int readAheadSize);  ReaderCharacterSource( final Reader reader );  ReaderCharacterSource( final String string ); @Override final int nextChar(); @Override final int currentChar(); @Override final boolean hasChar(); @Override final boolean consumeIfMatch( char[] match ); @Override final int location(); final int safeNextChar(); @Override final char[] findNextChar( int match, int esc ); final char[] findNextChar( boolean inMiddleOfString, boolean wasEscapeChar, int match, int esc ); @Override boolean hadEscape(); @Override void skipWhiteSpace(); char[] readNumber(  ); @Override String errorDetails( String message ); }
ReaderCharacterSource implements CharacterSource { @Override public final int nextChar() { ensureBuffer(); return ch = readBuf[index++]; } ReaderCharacterSource( final Reader reader, final int readAheadSize);  ReaderCharacterSource( final Reader reader );  ReaderCharacterSource( final String string ); @Override final int nextChar(); @Override final int currentChar(); @Override final boolean hasChar(); @Override final boolean consumeIfMatch( char[] match ); @Override final int location(); final int safeNextChar(); @Override final char[] findNextChar( int match, int esc ); final char[] findNextChar( boolean inMiddleOfString, boolean wasEscapeChar, int match, int esc ); @Override boolean hadEscape(); @Override void skipWhiteSpace(); char[] readNumber(  ); @Override String errorDetails( String message );  }