{
resources = resMgr.findResources(resourcePattern);
}
catch (ResourceMgrException e)
{
throw new ResourceMgrException("No image files found matching '" + resourcePattern + "'.");
}
if (resources.length == 0)
{
throw new ResourceMgrException("No image files found matching '" + resourcePattern + "'.");
}
for (int i = 0; i < resources.length; i++)
{
byte [] imageData = resMgr.loadByteResource(resources[i]);