public class BlackOutputStream extends OutputStream
OutputStream which blacks out written values.| Constructor and Description |
|---|
BlackOutputStream()
Creates a new instance without a limit.
|
BlackOutputStream(long limit)
Creates a new instance with given
limit. |
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Returns the number of bytes written so far.
|
WritableByteChannel |
newChannel()
Constructs a channel that writes bytes to this stream.
|
void |
write(int b)
Writes given byte.
|
close, flush, write, writepublic BlackOutputStream(long limit)
limit.limit - the maximum number of bytes for writer; any negative value
for no limit.public BlackOutputStream()
public void write(int b)
throws IOException
write in class OutputStreamb - the byte to writeIOException - if limit is not #UNLIMITED and the
number of bytes written so far exceeds it.public WritableByteChannel newChannel()
public long getCount()
Copyright © 2011-2013. All Rights Reserved.