//A Simple Implementation of ClassLoader.loadClass()

      public Class loadClass( String name, boolean resolve )
      throws ClassNotFoundException {
    try {

      // This will be the Class object that we create.
      // Note that we call it "clasz" instead of "class"
      // because "class" is a reserved word in Java
       Class clasz = null;

      // Obligatory step 1: if the class is already in the
      // system cache, we don't need to load it again
      clasz = findLoadedClass( name );

      if (clasz != null)
        return clasz;

      // Now we get to the custom part
      byte classData[] = /* get the bytes, somehow */;
      if (classData != null) {
        // We got the bytes!  Now, turn them into a Class object
        clasz = defineClass( name, classData, 0, classData.length );
      }

      // Obligatory step 2: if it didn't work,
      // maybe the class is to be found on the filesystem, so we
      // try to load it using the default ClassLoader
      if (clasz == null)
        clasz = findSystemClass( name );

      // Obligatory step 3: if we've been asked to,
      // resolve the class
      if (resolve && clasz != null)
        resolveClass( clasz );

      // Return the class to the caller
      return clasz;

    } catch( IOException ie ) {
      throw new ClassNotFoundException( ie.toString() );
    } catch( GeneralSecurityException gse ) {
      throw new ClassNotFoundException( gse.toString() );
    }
  }