Java tutorial
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; public class Main { private static List<InputStream> loadResources(String name, ClassLoader classLoader) throws IOException { final List<InputStream> list = new ArrayList<InputStream>(); final Enumeration<URL> systemResources = (classLoader == null ? ClassLoader.getSystemClassLoader() : classLoader).getResources(name); while (systemResources.hasMoreElements()) { list.add(systemResources.nextElement().openStream()); } return list; } }