/** * Returns an input stream on the requested resource. * @param name name of the resource to open. * @return an input stream on the requested resource, <code>null</code> if not found. */ @Override public InputStream getResourceAsStream(String name) { AbstractFile file; // File representing the resource. InputStream in; // Input stream on the resource. // Tries the parent first, to respect the delegation model. if((in = getParent().getResourceAsStream(name)) != null) return in; // Tries to locate the resource in the extended classpath if it wasn't found // in the parent. if((file = findResourceAsFile(name)) != null) { try {return file.getInputStream();} catch(Exception e) {} } // Couldn't find the resource. return null; }