org.apache.commons.io.input
Class ProxyReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended byorg.apache.commons.io.input.ProxyReader

public abstract class ProxyReader
extends FilterReader

A Proxy stream which acts as expected, that is it passes the method calls on to the proxied stream and doesn't change which methods are being called.

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 155419 2005-02-26 13:02:41Z dirkv $

Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
ProxyReader(Reader proxy)
          Constructs a new ProxyReader.
 
Method Summary
 void close()
           
 void mark(int idx)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] chr)
           
 int read(char[] chr, int st, int end)
           
 boolean ready()
           
 void reset()
           
 long skip(long ln)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyReader

public ProxyReader(Reader proxy)
Constructs a new ProxyReader.

Parameters:
proxy - the Reader to delegate to
Method Detail

read

public int read()
         throws IOException
Throws:
IOException
See Also:
Reader.read()

read

public int read(char[] chr)
         throws IOException
Throws:
IOException
See Also:
Reader.read(char[])

read

public int read(char[] chr,
                int st,
                int end)
         throws IOException
Throws:
IOException
See Also:
Reader.read(char[], int, int)

skip

public long skip(long ln)
          throws IOException
Throws:
IOException
See Also:
Reader.skip(long)

ready

public boolean ready()
              throws IOException
Throws:
IOException
See Also:
Reader.ready()

close

public void close()
           throws IOException
Throws:
IOException
See Also:
Reader.close()

mark

public void mark(int idx)
          throws IOException
Throws:
IOException
See Also:
Reader.mark(int)

reset

public void reset()
           throws IOException
Throws:
IOException
See Also:
Reader.reset()

markSupported

public boolean markSupported()
See Also:
Reader.markSupported()


Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.