public class NullOutputStream extends OutputStream
This output stream has no destination and all bytes written to it are ignored.
| Modifier and Type | Field and Description |
|---|---|
static NullOutputStream |
INSTANCE
The singleton instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b)
Does nothing.
|
void |
write(byte[] b,
int off,
int len)
Does nothing.
|
void |
write(int b)
Does nothing.
|
close, flushpublic static final NullOutputStream INSTANCE
public void write(byte[] b)
throws IOException
write in class OutputStreamb - The This method ignores this parameter.IOException - This method never throws any exceptions.public void write(byte[] b,
int off,
int len)
write in class OutputStreamb - This method ignores this parameter.off - This method ignores this parameter.len - This method ignores this parameter.public void write(int b)
write in class OutputStreamb - This method ignores this parameter.