public String readLine(PushbackReader in, boolean keepWhiteSpace)throws IOException {
        StringBuffer buffer = new StringBuffer();
        
        int EOF = -1;
        int c;
        
        c = in.read();
        while (c != EOF && c != '\n' && c != '\r') {
            if (!isWhite(c) || keepWhiteSpace) {
                buffer.append((char) c);
            }
            c = in.read();
        }
        
        if (c == '\r') {
            c = in.read();
            if (c != '\n') {
                in.unread(c);
            }
        }
        
        return buffer.toString();
    }