/** This implementation creates stream from the resource URL. I also tries to disable * url connection cache, to prevent jar file locking in the windows environment. * @see org.jboss.test.faces.staging.ServerResource#getAsStream() */ public InputStream getAsStream() throws IOException { URL url = getURL(); if (url != null) { URLConnection connection = url.openConnection(); try { connection.setUseCaches(false); } catch (IllegalArgumentException e) { log.info("RESOURCE_NOT_CACHEABLE"); } return connection.getInputStream(); } else { return null; } }
/** This implementation creates stream from the resource URL. I also tries to disable * url connection cache, to prevent jar file locking in the windows environment. * @see org.jboss.test.faces.staging.ServerResource#getAsStream() */ public InputStream getAsStream() throws IOException { URL url = getURL(); if (url != null) { URLConnection connection = url.openConnection(); try { connection.setUseCaches(false); } catch (IllegalArgumentException e) { log.info("RESOURCE_NOT_CACHEABLE"); } return connection.getInputStream(); } else { return null; } }