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 equivale
Rehashing the answers already provided -
Java does not have a NullOutputStream class. You could however roll your own OutputStream that ignores any data written to it - in other words write(int b), write(byte[] b) and write(byte[] b, int off, int len) will have empty method bodies. This is what the Common IO NullOutputStream class does.