/** {@inheritDoc} */ public InputStream getInputStream() throws ResourceException { InputStream ins = null; try { GetMethod getMethod = super.getResource(); byte[] response = getMethod.getResponseBody(); saveToResourceFile(response); ins = getMethod.getResponseBodyAsStream(); } catch (Exception e) { try { log.warn("HTTP resource '{}' was inaccessible for getInputStream(), trying backing file '{}'", getLocation(), resourceFile.getAbsolutePath()); ins = new FileInputStream(resourceFile); } catch (IOException ioe) { throw new ResourceException("Unable to read resource URL or backing file " + resourceFile.getAbsolutePath(), ioe); } } return applyFilter(ins); }