private boolean readIntoPushBack ( ) throws IOException { // File finished? boolean eof = false ; // Next char. final int ch = in . read ( ) ; if ( ch >= 0 ) { // Discard whitespace at start? if ( ! ( pulled == 0 && isWhiteSpace ( ch ) ) ) { // Good code. pulled += 1 ; // Parse out the &stuff; if ( ch == ' ' ) { // Process the & readAmpersand ( ) ; } else { // Not an '&', just append. pushBack . append ( ( char ) ch ) ; } } } else { // Hit end of file. eof = true ; } return eof ; }
Might not actually push back anything but usually will .