Hi All:
We have a handy NullOutputStream.
I'd like to add a convenience NullPrintStream, which would dead simple:
/**
* This PrintStream writes all data to the famous <b>/dev/null</b>.
* <p>
* This print stream has no destination (file/socket etc.) and all bytes
written to it are ignored and lost.
* </p>
* @since 2.7
*/
public class NullPrintStream extends PrintStream {
public static final NullPrintStream NULL_PRINT_STREAM = new
NullPrintStream();
@SuppressWarnings("resource")
public NullPrintStream() {
super(new NullOutputStream());
}
}
Any objections?
Gary