public URL run() { // Look for the resource URL result = policy.getResource(name); if (result == null) { if (trace) BaseClassLoader.log.trace(BaseClassLoader.this + " resource not found locally " + name); return null; } if (trace) BaseClassLoader.log.trace(BaseClassLoader.this + " got resource locally " + name); return result; } }, policy.getAccessControlContext());
public URL run() { // Look for the resource URL result = policy.getResource(name); if (result == null) { if (trace) BaseClassLoader.log.trace(BaseClassLoader.this + " resource not found locally " + name); return null; } if (trace) BaseClassLoader.log.trace(BaseClassLoader.this + " got resource locally " + name); return result; } }, policy.getAccessControlContext());
/** * Get the resource as a stream<p> * * Uses {@link #getResource(String)} by default * * @param path the path * @return the stream or null if not found */ public InputStream getResourceAsStream(String path) { URL url = getResource(path); if (url != null) { try { return url.openStream(); } catch (IOException e) { log.debug("Unable to open URL: " + url + " for path " + path + " from " + toLongString()); } } return null; }
/** * Get the resource as a stream<p> * * Uses {@link #getResource(String)} by default * * @param path the path * @return the stream or null if not found */ public InputStream getResourceAsStream(String path) { URL url = getResource(path); if (url != null) { try { return url.openStream(); } catch (IOException e) { log.debug("Unable to open URL: " + url + " for path " + path + " from " + toLongString()); } } return null; }