public class NullOutputStream
extends java.io.OutputStream
This output stream has no destination (file/socket etc.) and all bytes written to it are ignored and lost.
Modifier and Type | Field and Description |
---|---|
static NullOutputStream |
NULL_OUTPUT_STREAM
A singleton.
|
Constructor and Description |
---|
NullOutputStream() |
public static final NullOutputStream NULL_OUTPUT_STREAM
public void write(byte[] b, int off, int len)
/dev/null
.write
in class java.io.OutputStream
b
- The bytes to writeoff
- The start offsetlen
- The number of bytes to writepublic void write(int b)
/dev/null
.write
in class java.io.OutputStream
b
- The byte to writepublic void write(byte[] b) throws java.io.IOException
/dev/null
.write
in class java.io.OutputStream
b
- The bytes to writejava.io.IOException
- neverCopyright (c) 2002-2012 Apache Software Foundation