docs: protected Class<?> defineClass(String name, sun.misc.Resource res) throws IOException {
  		final int i = name.lastIndexOf('.');
  		final URL url = res.getCodeSourceURL();
  		if (i != -1) {
  			final String pkgname = name.substring(0, i);
  			// Check if package already loaded.
  			final Package pkg = getPackage(pkgname);
  			final Manifest man = res.getManifest();
  			if (pkg != null) {
  				// Package found, so check package sealing.
  				if (pkg.isSealed()) {
  					// Verify that code source URL is the same.
  					if (!pkg.isSealed(url)) {
  						throw new SecurityException(Locale.getString("E1", pkgname)); //$NON-NLS-1$
  					}
  				} else {
  					// Make sure we are not attempting to seal the package
  					// at this code source URL.
  					if ((man != null) && isSealed(pkgname, man)) {
  						throw new SecurityException(Locale.getString("E2", pkgname)); //$NON-NLS-1$
  					}
  				}
  			} else {
  				if (man != null) {
  					definePackage(pkgname, man, url);
  				} else {
  					definePackage(pkgname, null, null, null, null, null, null, null);
  				}
  			}
  		}
  		// Now read the class bytes and define the class
  		final java.nio.ByteBuffer bb = res.getByteBuffer();
  		if (bb != null) {
  			// Use (direct) ByteBuffer:
  			final CodeSigner[] signers = res.getCodeSigners();
  			final CodeSource cs = new CodeSource(url, signers);
  			return defineClass(name, bb, cs);
  		}
  
  		final byte[] b = res.getBytes();
  		// must read certificates AFTER reading bytes.
  		final CodeSigner[] signers = res.getCodeSigners();
  		final CodeSource cs = new CodeSource(url, signers);
  		return defineClass(name, b, 0, b.length, cs);
  
  	}