Code example for Reader

Methods: read

0
    public Character next(boolean withStack) throws IOException {
        if (withStack && !stack.isEmpty()) {
            return stack.pop();
        } 
 
        int c = reader.read();
        if (c == -1) {
            return null; 
        } 
        if (c == '\r') {
            return next(); 
        } 
 
        return new Character((char) c);
    } 
}