sam.io
Class ByteArrayFilter.OutputStream
java.lang.Object
|
+--java.io.OutputStream
|
+--sam.io.ByteArrayFilter.OutputStream
- Enclosing class:
- ByteArrayFilter
- public class ByteArrayFilter.OutputStream
- extends java.io.OutputStream
Instance inner-class for filtering an OutputStream
with outer-instance's filter,
as in:
ByteArrayFilter filter = new MyByteArrayFilter(myKey);
OutputStream output = filter.new OutputStream(toBeFilteredOutputStream);
- See Also:
ByteArrayFilter.InputStream
Constructor Summary |
ByteArrayFilter.OutputStream(int size,
java.io.OutputStream delegee)
Builts a new OutputStream to write data that will be transparently filtered. |
ByteArrayFilter.OutputStream(java.io.OutputStream delegee)
Builts a new OutputStream to write data that will be transparently filtered. |
Method Summary |
void |
close()
|
void |
flush()
|
void |
write(byte[] data,
int begin,
int length)
|
void |
write(int value)
|
Methods inherited from class java.io.OutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayFilter.OutputStream
public ByteArrayFilter.OutputStream(java.io.OutputStream delegee)
- Builts a new
OutputStream
to write data that will be transparently filtered.
- Parameters:
delegee
- the underlying output stream to write filtered bytes to
ByteArrayFilter.OutputStream
public ByteArrayFilter.OutputStream(int size,
java.io.OutputStream delegee)
- Builts a new
OutputStream
to write data that will be transparently filtered.
- Parameters:
size
- the desired buffer size in atomic blocks (i.e. the underlying
byte[]
buffer will be of total length size * length, where length
is the length of the enclosing ByteArrayFilter
)delegee
- the underlying output stream to write filtered bytes to
write
public void write(int value)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
java.io.IOException
write
public void write(byte[] data,
int begin,
int length)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class java.io.OutputStream
java.io.IOException
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.OutputStream
java.io.IOException