class HttpUtils {

    public static void consumeAndClose(@Nullable HttpURLConnection connection) {
        if (connection != null) {
            IOUtils.consumeAndClose(connection.getErrorStream());
            try {
                IOUtils.consumeAndClose(connection.getInputStream());
            } catch (IOException ignored) {
                // silently ignored
            }
        }
    }

    private  HttpUtils();

}