@Override
    public void reset() throws IOException {
        this.fis.close();
        abortIfNeeded();
        this.fis = new FileInputStream(file);

        long skipped = 0;
        long toSkip = markPoint;
        while (toSkip > 0) {
            skipped = this.fis.skip(toSkip);
            toSkip -= skipped;
        }

        if (log.isDebugEnabled()) {
            log.debug("Reset to mark point " + markPoint
                    + " after returning " + bytesReadPastMarkPoint + " bytes");
        }
        this.bytesReadPastMarkPoint = 0;
    }
Resets the input stream to the last mark point, or the beginning of the
stream if there is no mark point, by creating a new FileInputStream based
on the underlying file.

@throws IOException
            when the FileInputStream cannot be re-created.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/RepeatableFileInputStream.java