org.apache.commons.io.output

Class ProxyWriter


public class ProxyWriter
extends FilterWriter

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 FilterWriter to increase reusability, because FilterWriter changes the methods being called, such as write(char[]) to write(char[], int, int) and write(String) to write(String, int, int).
Version:
$Id: ProxyWriter.java 471628 2006-11-06 04:06:45Z bayard $
Author:
Stephen Colebourne

Constructor Summary

ProxyWriter(Writer proxy)
Constructs a new ProxyWriter.

Method Summary

void
close()
void
flush()
void
write(String str)
void
write(String str, int st, int end)
void
write(char[] chr)
void
write(char[] chr, int st, int end)
void
write(int idx)

Constructor Details

ProxyWriter

public ProxyWriter(Writer proxy)
Constructs a new ProxyWriter.
Parameters:
proxy - the Writer to delegate to

Method Details

close

public void close()
            throws IOException
See Also:
java.io.Writer.close()

flush

public void flush()
            throws IOException
See Also:
java.io.Writer.flush()

write

public void write(String str)
            throws IOException
See Also:
java.io.Writer.write(String)

write

public void write(String str,
                  int st,
                  int end)
            throws IOException
See Also:
java.io.Writer.write(String, int, int)

write

public void write(char[] chr)
            throws IOException
See Also:
java.io.Writer.write(char[])

write

public void write(char[] chr,
                  int st,
                  int end)
            throws IOException
See Also:
java.io.Writer.write(char[], int, int)

write

public void write(int idx)
            throws IOException
See Also:
java.io.Writer.write(int)