public static InputStream getResourceAsStream(Class origClass, String resourceName) { if (traceResourceLoading) { Logger.debug("Loading MIDlet resource", resourceName); } if (classLoader != origClass.getClassLoader()) { // showWarning String callLocation = ThreadUtils.getCallLocation(FQCN); if (callLocation != null && MIDletClassLoader.debug) { Logger.debug("attempt to load resource [" + resourceName + "] using System ClasslLoader from " + callLocation); } } resourceName = resolveName(origClass, resourceName); InputStream is = classLoader.getResourceAsStream(resourceName); if (is == null) { Logger.debug("Resource not found ", resourceName); return null; } else { return new MIDletResourceInputStream(is); } }