public static URL getUniqueResource( String resourceName, String resourceDescription ) throws IOException
{
Enumeration<URL> resources = DefaultSchemaLdifExtractor.class.getClassLoader().getResources( resourceName );
if ( !resources.hasMoreElements() )
{
throw new UniqueResourceException( resourceName, resourceDescription );
}
URL result = resources.nextElement();
if ( resources.hasMoreElements() )
{
throw new UniqueResourceException( resourceName, result, resources, resourceDescription );
}
return result;
}