I need to specify an OutputStream
for an API I'm using, but I don't actually have a need for the output. Does Java have an OutputStream
equivalent to > /dev/null
?
/**Writes to nowhere*/
public class NullOutputStream extends OutputStream {
@Override
public void write(int b) throws IOException {
}
}