Code example for Reader

Methods: read

0
        this.reader = reader;
        totalRead = 0;
    } 
 
    public int read(char cbuf[], int off, int len) throws IOException {
        int read = reader.read(cbuf, off, len);
        totalRead += read;
        return read;
    } 
 
    public void close() throws IOException { 
        reader.close();
    } 
 
    public long getTotalRead() { 
        return totalRead;
    } 
}