try {
inputSubStream = new InputSubstream(
newResettableInputStream(file, fileNotFoundMsg)
.disableClose(), // requires explicit release
currentPosition, length, true);
inputSubStream.mark(-1);
String checksum = TreeHashGenerator.calculateTreeHash(inputSubStream);
byte[] binaryChecksum = BinaryUtils.fromHex(checksum);
inputSubStream.reset();
UploadMultipartPartRequest req = new UploadMultipartPartRequest()
.withAccountId(accountId)