File classFile = findClassFile(name); if (classFile == null) { throw new ClassNotFoundException(name); } Class newClass; try { FileInputStream in = new FileInputStream(classFile); int length = in.available(); if (length == 0) { throw new ClassNotFoundException(name); } byte buffer[] = new byte[length]; in.read(buffer); in.close(); newClass = defineClass(name, buffer, 0, buffer.length); classLoaderLog.info("Did load class: " + name); } catch (IOException e) { throw new ClassNotFoundException(e.getMessage()); } return newClass; }
boolean contains = false; Enumeration e = classFiles.objectEnumerator(); while (e.hasMoreElements()) { CacheEntry ce = (CacheEntry)e.nextElement(); if (ce.classNameWithPackage().equals(name)) { contains = true; break; } }  if (contains) { byte buffer[] = null; Class newClass; File classFile = findClassFile(name); if (classFile == null) { throw new ClassNotFoundException(name); } try { FileInputStream in = new FileInputStream(classFile); int length = in.available(); if (length == 0) { throw new ClassNotFoundException(name); } buffer = new byte[length]; in.read(buffer); in.close(); } catch (IOException iox) { classLoaderLog.debug(iox); throw new ClassNotFoundException(iox.getMessage()); } try { newClass = defineClass(name, buffer, 0, buffer.length); classLoaderLog.info("Did load class: " + name); } catch (Throwable t) { classLoaderLog.debug(t); throw new RuntimeException(t.getMessage()); } return newClass; } else {   Class clazz = Class.forName(name); if (clazz != null) { return clazz; } else { throw new IllegalStateException("could not get class "+name+" with classForName method!"); } } }
        protected Class findClass(String name) throws ClassNotFoundException {            File classFile = findClassFile(name);            if (classFile == null) {                throw new ClassNotFoundException(name);            }            Class newClass;            try {                FileInputStream in = new FileInputStream(classFile);                int length = in.available();                if (length == 0) {                    throw new ClassNotFoundException(name);                }                byte buffer[] = new byte[length];                in.read(buffer);                in.close();                newClass = defineClass(name, buffer, 0, buffer.length);                classLoaderLog.info("Did load class: " + name);            } catch (IOException e) {                throw new ClassNotFoundException(e.getMessage());            }            return newClass;        }