Code example for PushbackReader

Methods: read, unread

0
     
    private class CsvIndex implements Index { 
        public boolean done() { 
            char c = '\0';
            try { 
                c = (char) stream.read();
                stream.unread(c);
            } catch (IOException ex) {
            } 
            return (c == '}') ? true : false;
        } 
        public void incr() {} 
    } 
     
    private void throwExceptionOnError(String tag) throws IOException {
        throw new IOException("Error deserializing "+tag);
    } 
     
    private String readField(String tag) throws IOException {
        try { 
            StringBuilder buf = new StringBuilder();