@Override public URL nextElement() { return resourceList.get(idx++).getURL(); } };
@Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append('['); for (int i = 0, n = size(); i < n; i++) { if (i > 0) { buf.append(", "); } buf.append(get(i)); } buf.append(']'); return buf.toString(); }
@Override public URL getResource(final String path) { final ResourceList resourceList = scanResult.getResourcesWithPath(path); if (resourceList == null || resourceList.isEmpty()) { return super.getResource(path); } else { return resourceList.get(0).getURL(); } }
@Override public InputStream getResourceAsStream(final String path) { final ResourceList resourceList = scanResult.getResourcesWithPath(path); if (resourceList == null || resourceList.isEmpty()) { return super.getResourceAsStream(path); } else { try { return resourceList.get(0).open(); } catch (final IOException e) { return null; } } } }