inS = openConnection(client, getMethod);
/* Try to pipe the resulting stream into a GZipInputStream */
inS = pipeStream(inS, getMethod);
} catch (IOException e) {
throw new ConnectionException(Activator.getDefault().createErrorStatus(e.getMessage(), e));
}
/* In case authentication required / failed */
if (getMethod.getStatusCode() == HTTP_ERROR_AUTH_REQUIRED)
throw new AuthenticationRequiredException(Activator.getDefault().createErrorStatus("Authentication required!", null)); //$NON-NLS-1$
/* In case proxy-authentication required / failed */
if (getMethod.getStatusCode() == HTTP_ERROR_PROXY_AUTH_REQUIRED)
throw new ProxyAuthenticationRequiredException(Activator.getDefault().createErrorStatus("Proxy-Authentication required!", null)); //$NON-NLS-1$
/* If status code is 4xx, throw an IOException with the status code included */
if (getMethod.getStatusCode() >= HTTP_ERRORS)
throw new ConnectionException(Activator.getDefault().createErrorStatus("Server returned HTTP Status " + String.valueOf(getMethod.getStatusCode()), null)); //$NON-NLS-1$
/* In case the Feed has not been modified since */
if (getMethod.getStatusCode() == HTTP_STATUS_NOT_MODIFIED)
throw new NotModifiedException(Activator.getDefault().createInfoStatus("Feed has not been modified since!", null)); //$NON-NLS-1$
/* In case response body is not available */
if (inS == null)
throw new ConnectionException(Activator.getDefault().createErrorStatus("Response Stream is not available!", null)); //$NON-NLS-1$
/* Check wether a Progress Monitor is provided to support early cancelation */
IProgressMonitor monitor = null;
if (properties != null && properties.containsKey(IConnectionPropertyConstants.PROGRESS_MONITOR))
monitor = (IProgressMonitor) properties.get(IConnectionPropertyConstants.PROGRESS_MONITOR);