if (getObjectRequest.getRange() == null && System.getProperty("com.amazonaws.services.s3.disableGetObjectMD5Validation") == null) {
byte[] serverSideHash = null;
String etag = s3Object.getObjectMetadata().getETag();
if (etag != null && ServiceUtils.isMultipartUploadETag(etag) == false) {
serverSideHash = BinaryUtils.fromHex(s3Object.getObjectMetadata().getETag());
DigestValidationInputStream inputStreamWithMD5DigestValidation;
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
inputStreamWithMD5DigestValidation = new DigestValidationInputStream(input, digest, serverSideHash);
input = new S3ObjectInputStream(inputStreamWithMD5DigestValidation, input.getHttpRequest());
} catch (NoSuchAlgorithmException e) {
log.warn("No MD5 digest algorithm available. Unable to calculate "
+ "checksum and verify data integrity.", e);
}