A ChecksumInputStream is a FilterInputStream with the added
functionality of calculating checksums as it goes.
The idea of replacing this with java.util.zip.CheckedInputStream
looks very tempting, but we need the byte count, which
CheckedInputStream doesn't provide.
public int read(byte b,
Reads up to len bytes of data from the input stream
into an array of bytes. An attempt is made to read as
many as len bytes, but a smaller number may be read,
possibly zero. The number of bytes actually read is
returned as an integer.
All bytes read are fed through the checksummer.