/** * @see Reader#read() */ @Override public int read() throws IOException { int c; do { c= nextChar(); while (!fReadFromBuffer && c != -1) { String s= computeSubstitution(c); if (s == null) break; if (s.length() > 0) fBuffer.insert(0, s); c= nextChar(); } } while (fSkipWhiteSpace && fWasWhiteSpace && (c == ' ')); fWasWhiteSpace= (c == ' ' || c == '\r' || c == '\n'); return c; }
/** * @see Reader#read() */ @Override public int read() throws IOException { int c; do { c= nextChar(); while (!fReadFromBuffer && c != -1) { String s= computeSubstitution(c); if (s == null) break; if (s.length() > 0) fBuffer.insert(0, s); c= nextChar(); } } while (fSkipWhiteSpace && fWasWhiteSpace && (c == ' ')); fWasWhiteSpace= (c == ' ' || c == '\r' || c == '\n'); return c; }