Logo Search packages:      
Sourcecode: jamvm version File versions

final Class java::lang::ClassLoader::defineClass ( String  name,
byte[]  data,
int  offset,
int  len 
) throws ClassFormatError [inline, protected]

Helper to define a class using a string of bytes without a ProtectionDomain. Subclasses should call this method from their findClass() implementation. The name should use '.' separators, and discard the trailing ".class". The default protection domain has the permissions of Policy.getPolicy().getPermissions(new CodeSource(null, null)).

Parameters:
name the name to give the class, or null if unknown
data the data representing the classfile, in classfile format
offset the offset into the data where the classfile starts
len the length of the classfile data in the array
Returns:
the class that was defined
Exceptions:
ClassFormatError if data is not in proper classfile format
IndexOutOfBoundsException if offset or len is negative, or offset + len exceeds data
SecurityException if name starts with "java."
Since:
1.1

Definition at line 392 of file ClassLoader.java.

References defineClass().

  {
    return defineClass(name, data, offset, len, null);
  }


Generated by  Doxygen 1.6.0   Back to index