class DefaultResourceManager implements ResourceManager {

    @Override
    public InputStream getResourceAsStream(String location) {
        InputStream result = null;
        Iterator<Resource> iterator = resources.iterator();
        while (iterator.hasNext()) {
            Resource resource = iterator.next();
            result = resource.getResourceAsStream(location);
            if (result != null) {
                break;
            }
        }
        if (result == null) {
            result = getClass().getResourceAsStream(location);
        }
        return result;
    }

}