@Test public void testWrite_WholeBuffer() throws IOException { outputStream.write(data); }
@Override public void write(int b) throws IOException { int expected = expectedBytesStream.read(); if (expected == -1) { throw new MismatchException("EOF reached in expectedBytesStream"); } if (expected != b) { throw new MismatchException("Data does not match"); } }
MatchingOutputStream extends OutputStream { @Override public void write(int b) throws IOException { int expected = expectedBytesStream.read(); if (expected == -1) { throw new MismatchException("EOF reached in expectedBytesStream"); } if (expected != b) { throw new MismatchException("Data does not match"); } } }
MatchingOutputStream extends OutputStream { @Override public void write(int b) throws IOException { int expected = expectedBytesStream.read(); if (expected == -1) { throw new MismatchException("EOF reached in expectedBytesStream"); } if (expected != b) { throw new MismatchException("Data does not match"); } } MatchingOutputStream(InputStream expectedBytesStream, int matchBufferSize); }
MatchingOutputStream extends OutputStream { @Override public void write(int b) throws IOException { int expected = expectedBytesStream.read(); if (expected == -1) { throw new MismatchException("EOF reached in expectedBytesStream"); } if (expected != b) { throw new MismatchException("Data does not match"); } } MatchingOutputStream(InputStream expectedBytesStream, int matchBufferSize); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] dataToWrite, int offset, int length); void expectEof(); }
MatchingOutputStream extends OutputStream { @Override public void write(int b) throws IOException { int expected = expectedBytesStream.read(); if (expected == -1) { throw new MismatchException("EOF reached in expectedBytesStream"); } if (expected != b) { throw new MismatchException("Data does not match"); } } MatchingOutputStream(InputStream expectedBytesStream, int matchBufferSize); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] dataToWrite, int offset, int length); void expectEof();  }