@Test public void givenSkipGreaterThanByteArray_whenIWriteArray_thenIGetNoOutput() throws Exception { byte[] array = new byte[]{1, 2, 3, 4, 5}; SkippingOutputStream testSubject = new SkippingOutputStream(10, outputStream); testSubject.write(array); assertEquals(0, outputStream.toByteArray().length); }
public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } }
SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } } }
SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } } SkippingOutputStream(long toSkip, OutputStream wrapped); }
SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } } SkippingOutputStream(long toSkip, OutputStream wrapped); void write(int b); void write(byte[] b); void write(byte[] b, int off, int len); }
SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } } SkippingOutputStream(long toSkip, OutputStream wrapped); void write(int b); void write(byte[] b); void write(byte[] b, int off, int len);  }