ProxyWriterpublic 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). |
Constructors Summary |
---|
public ProxyWriter(Writer proxy)Constructs a new ProxyWriter.
super(proxy);
// the proxy is stored in a protected superclass variable named 'out'
|
Methods Summary |
---|
public void | close()Invokes the delegate's close() method.
out.close();
| public void | flush()Invokes the delegate's flush() method.
out.flush();
| public void | write(int idx)Invokes the delegate's write(int) method.
out.write(idx);
| public void | write(char[] chr)Invokes the delegate's write(char[]) method.
out.write(chr);
| public void | write(char[] chr, int st, int end)Invokes the delegate's write(char[], int, int) method.
out.write(chr, st, end);
| public void | write(java.lang.String str)Invokes the delegate's write(String) method.
out.write(str);
| public void | write(java.lang.String str, int st, int end)Invokes the delegate's write(String) method.
out.write(str, st, end);
|
|