org.apache.commons.io.input
public abstract class ProxyReader extends FilterReader
It is an alternative base class to FilterReader to increase reusability, because FilterReader changes the methods being called, such as read(char[]) to read(char[], int, int).
Version: $Id: ProxyReader.java 610010 2008-01-08 14:50:59Z niallp $
Constructor Summary | |
---|---|
ProxyReader(Reader proxy)
Constructs a new ProxyReader.
|
Method Summary | |
---|---|
void | close()
Invokes the delegate's close() method. |
void | mark(int idx)
Invokes the delegate's mark(int) method. |
boolean | markSupported()
Invokes the delegate's markSupported() method. |
int | read()
Invokes the delegate's read() method. |
int | read(char[] chr)
Invokes the delegate's read(char[]) method. |
int | read(char[] chr, int st, int end)
Invokes the delegate's read(char[], int, int) method. |
boolean | ready()
Invokes the delegate's ready() method. |
void | reset()
Invokes the delegate's reset() method. |
long | skip(long ln)
Invokes the delegate's skip(long) method. |
Parameters: proxy the Reader to delegate to
close()
method.Throws: IOException if an I/O error occurs
mark(int)
method.Parameters: idx read ahead limit
Throws: IOException if an I/O error occurs
markSupported()
method.Returns: true if mark is supported, otherwise false
read()
method.Returns: the character read or -1 if the end of stream
Throws: IOException if an I/O error occurs
read(char[])
method.Parameters: chr the buffer to read the characters into
Returns: the number of characters read or -1 if the end of stream
Throws: IOException if an I/O error occurs
read(char[], int, int)
method.Parameters: chr the buffer to read the characters into st The start offset end The number of bytes to read
Returns: the number of characters read or -1 if the end of stream
Throws: IOException if an I/O error occurs
ready()
method.Returns: true if the stream is ready to be read
Throws: IOException if an I/O error occurs
reset()
method.Throws: IOException if an I/O error occurs
skip(long)
method.Parameters: ln the number of bytes to skip
Returns: the number of bytes to skipped or -1 if the end of stream
Throws: IOException if an I/O error occurs