Code example for Reader

Methods: read

0
        delegateReader.close();
    } 
 
    @Override 
    public int read(final char[] arg0, final int arg1, final int arg2) throws IOException {
        return delegateReader.read(arg0, arg1, arg2);
    } 
 
    @Override 
    public void reset() throws IOException { 
        delegateReader.reset();
    } 
 
    public String readAll() throws IOException {
        final StringBuffer buffer = new StringBuffer();
        final char[] cbuf = new char[1000];
        int n;
        while ((n = delegateReader.read(cbuf, 0, 1000)) != -1) {
            buffer.append(cbuf, 0, n);
        } 
        return buffer.toString();