THE PACKAGE JAVA.LANG
java.lang.ClassLoader
20.14
20.14.2
protected abstract Class loadClass(String name,
boolean link)
throws ClassNotFoundException
Every subclass of
ClassLoader
 that is not itself abstract must provide an imple 
mentation of the method
loadClass
.
The general contract of
loadClass
 is that, given the
name
 of a class, it either
returns the
Class
 object for the class or throws a
ClassNotFoundException
.
If a
Class
 object is to be returned and
link
 is
true
, then the
Class
 object
should be linked ( 12.3,  20.14.4) before it is returned.
In most cases, it is wise for a subclass of
ClassLoader
 ( 20.14) to implement
the
loadClass
 method as a
synchronized
 method.
20.14.3
protected final Class defineClass(byte data[],
int offset, int length)
throws NullPointerException,
IndexOutOfBoundsException, ClassFormatError
This method may be used by a class loader to define a new class.
The bytes in the array
data
 in positions
offset
 through
offset+length 1
should have the format of a valid class file as defined by the
Java Virtual Machine
Specification
.
If
data
 is
null
, then a
NullPointerException
 is thrown.
An
IndexOutOfBoundsException
 is thrown if any of the following are true:
offset
 is negative
length
 is negative
offset+length
 is greater than
data.length
If the indicated bytes of
data
 do not constitute a valid class definition, then a
ClassFormatError
 is thrown. Otherwise, this method creates and returns a
Class
 object as described by the data bytes
559






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved