@Override
    public int read(@NonNull final byte[] buffer, final int offset, final int count) throws IOException {
        final int read = super.read(buffer, offset, count);
        progress += read;
        return read;
    }
Stream to measure progress of reading automatically.
<p>
The method @link ProgressInputStream#read(byte[]) does not need to be overridden as it delegates to @link
ProgressInputStream#read(byte[], int, int) anyway.
</p>
main/src/main/java/cgeo/geocaching/files/ProgressInputStream.java