public LengthCheckInputStream(InputStream in,
Constructs an input stream that performs length check to ensure the
number of bytes read from the underlying input stream is the same as the
in - the underlying input stream
expectedLength - the total length of the data in bytes expected to be read from
the underlying input stream; must be non-negative.
includeSkipped - true if bytes skipped are to be considered as part of the data
length; false otherwise. Typically, this parameter should be
set to false for uploading data to AWS, but set to true for
receiving data from AWS.