org.apache.commons.io.output
Class ProxyWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
org.apache.commons.io.output.ProxyWriter
- public class ProxyWriter
- extends java.io.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).
Field Summary |
private java.io.Writer |
proxy
|
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
ProxyWriter(java.io.Writer proxy)
Constructs a new ProxyWriter. |
Method Summary |
void |
close()
|
void |
flush()
|
void |
write(char[] chr)
|
void |
write(char[] chr,
int st,
int end)
|
void |
write(int idx)
|
void |
write(java.lang.String str)
|
void |
write(java.lang.String str,
int st,
int end)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
proxy
private java.io.Writer proxy
ProxyWriter
public ProxyWriter(java.io.Writer proxy)
- Constructs a new ProxyWriter.
- Parameters:
proxy
- Writer to delegate to
write
public void write(int idx)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.write(int)
write
public void write(char[] chr)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.write(char[])
write
public void write(char[] chr,
int st,
int end)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.write(char[], int, int)
write
public void write(java.lang.String str)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.write(String)
write
public void write(java.lang.String str,
int st,
int end)
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.write(String, int, int)
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.flush()
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
Writer.close()