@Override
    public int read() throws IOException {
        abortIfNeeded();
        int byteRead = fis.read();
        if (byteRead != -1) {
            bytesReadPastMarkPoint++;
            return byteRead;
        } else {
            return -1;
        }
    }
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