{
// Deal with S3 error stream.
InputStream in = httpConn.getErrorStream( );
if ( in == null )
{
throw new ProviderRequestException(
"An exception ocurred while performing S3 request and no error message was given. The response code was "
+ statusCode
+ ". See http://docs.amazonwebservices.com/AmazonS3/latest/index.html?ErrorCodeList.html for more information.",
String.valueOf( statusCode ) );
}
String errorStr = getS3ErrorCode( in );
throw new ProviderRequestException( errorStr );
}
setResponseHeaders( httpConn.getHeaderFields( ) );
return httpConn.getInputStream( );
}