@Test public void calculatesACrcCorrectlyWhenReading() throws Exception { final byte[] data = getUtf8Bytes("The quick brown fox jumps over the \000\001\002\003"); final long expectedCrc = computeCrcDirectly(data); final CrcInputStream crcInputStream = createCrcInputStreamReadingFromByteArray(data); readEntireInputStream(crcInputStream); assertThat(crcInputStream.getValue(), is(equalTo(expectedCrc))); }
public long getValue() { return crc.getValue(); }
CrcInputStream extends FilterInputStream { public long getValue() { return crc.getValue(); } }
CrcInputStream extends FilterInputStream { public long getValue() { return crc.getValue(); } CrcInputStream(InputStream inputStream, Checksum crc); }
CrcInputStream extends FilterInputStream { public long getValue() { return crc.getValue(); } CrcInputStream(InputStream inputStream, Checksum crc); long getValue(); void reset(); @Override int read(); @Override int read(byte[] b, int off, int len); }
CrcInputStream extends FilterInputStream { public long getValue() { return crc.getValue(); } CrcInputStream(InputStream inputStream, Checksum crc); long getValue(); void reset(); @Override int read(); @Override int read(byte[] b, int off, int len);  }