HttpEntityEnclosingRequest httpEntityEnclosingRequest = (HttpEntityEnclosingRequest)method;
httpResponse.setContent(new HttpMethodReleaseInputStream(httpEntityEnclosingRequest));
}
try {
CountingInputStream countingInputStream = null;
if (System.getProperty(PROFILING_SYSTEM_PROPERTY) != null) {
countingInputStream = new CountingInputStream(httpResponse.getContent());
httpResponse.setContent(countingInputStream);
}
long startTime = System.currentTimeMillis();
AmazonWebServiceResponse<? extends T> awsResponse = responseHandler.handle(httpResponse);
long endTime = System.currentTimeMillis();
if (System.getProperty(PROFILING_SYSTEM_PROPERTY) != null) {
if (executionContext.getTimingInfo() != null) {
TimingInfo timingInfo = executionContext.getTimingInfo();
TimingInfo responseProcessingTiming = new TimingInfo(startTime, endTime);
timingInfo.addSubMeasurement(RESPONSE_PROCESSING_SUBMEASUREMENT, responseProcessingTiming);
if (countingInputStream != null) {
responseProcessingTiming.addCounter(BYTES_PROCESSED_COUNTER, countingInputStream.getByteCount());
}
}
}
if (awsResponse == null)