public class ProxyOutputStream extends FilterOutputStream
See the protected methods for ways in which a subclass can easily decorate a stream with custom pre-, post- or error processing functionality.
Constructor and Description |
---|
ProxyOutputStream(OutputStream proxy)
Constructs a new ProxyOutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Invokes the delegate's
close() method. |
void |
flush()
Invokes the delegate's
flush() method. |
void |
write(byte[] bts)
Invokes the delegate's
write(byte[]) method. |
void |
write(byte[] bts,
int st,
int end)
Invokes the delegate's
write(byte[]) method. |
void |
write(int idx)
Invokes the delegate's
write(int) method. |
public ProxyOutputStream(OutputStream proxy)
proxy
- the OutputStream to delegate topublic void write(int idx) throws IOException
write(int)
method.write
in class FilterOutputStream
idx
- the byte to writeIOException
- if an I/O error occurspublic void write(byte[] bts) throws IOException
write(byte[])
method.write
in class FilterOutputStream
bts
- the bytes to writeIOException
- if an I/O error occurspublic void write(byte[] bts, int st, int end) throws IOException
write(byte[])
method.write
in class FilterOutputStream
bts
- the bytes to writest
- The start offsetend
- The number of bytes to writeIOException
- if an I/O error occurspublic void flush() throws IOException
flush()
method.flush
in interface Flushable
flush
in class FilterOutputStream
IOException
- if an I/O error occurspublic void close() throws IOException
close()
method.close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException
- if an I/O error occursJas4pp 1.5 © Java Analysis Studio for Particle Physics