private String diagnosticInfo() {
        return new StringBuilder()
            .append("dataLength=").append(dataLength)
            .append("; expectedLength=").append(expectedLength)
            .append("; includeSkipped=").append(includeSkipped)
            .append("; in.getClass()=").append(in.getClass())
            .append("; markedSupported=").append(markSupported())
            .append("; marked=").append(marked)
            .append("; resetSinceLastMarked=").append(resetSinceLastMarked)
            .append("; markCount=").append(markCount)
            .append("; resetCount=").append(resetCount)
            .toString();
    }
Checks the data length read so far against the expected total.

@param eof
           true if end of stream has been encountered; false otherwise

@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