@Override
    public int read() throws IOException {
        int read = super.read();
        if ( read >= 0 )
            byteOffset++;

        digestPart();
        return read;
    }
Returns the list of one-megabyte checksums for this input stream. Only
valid once the stream has been closed.

@throws IOException
            If the stream hasn't been closed.
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/internal/TreeHashInputStream.java