@Override
    public void mark(int readlimit) {
        if (markSupported()) {
            super.mark(readlimit);
            marked = dataLength;
            markCount++;
            resetSinceLastMarked = false;
        }
    }
{@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