@Override
    public void reset() throws IOException {
        if (markSupported()) {
            super.reset();
            dataLength = marked;
            resetCount++;
            resetSinceLastMarked = true;
        } else {
            throw new IOException("mark/reset not supported");
        }
    }
{@inheritDoc}

@throws SdkClientException
            if the data length read has exceeded the expected total, or
            if the total data length is not the same as the expected
            total.
aws-java-sdk-core/src/main/java/com/amazonaws/util/LengthCheckInputStream.java