### Question:
NullOutputStream extends OutputStream { @Override public void write(final byte[] b, final int off, final int len) { }  @Override void write(final byte[] b, final int off, final int len); @Override void write(final int b); @Override void write(final byte[] b); static final NullOutputStream NULL_OUTPUT_STREAM; }### Answer:
@Test public void testNull() throws IOException { final NullOutputStream nos = new NullOutputStream(); nos.write("string".getBytes()); nos.write("some string".getBytes(), 3, 5); nos.write(1); nos.write(0x0f); nos.flush(); nos.close(); nos.write("allowed".getBytes()); nos.write(255); }