📄 secureclassloader.html
字号:
<TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="SecureClassLoader(java.lang.ClassLoader)"><!-- --></A><H3>SecureClassLoader</H3><PRE>protected <B>SecureClassLoader</B>(<A HREF="../../java/lang/ClassLoader.html">ClassLoader</A> parent)</PRE><DL><DD>Creates a new SecureClassLoader using the specified parent class loader for delegation. <p>If there is a security manager, this method first calls the security manager's <code>checkCreateClassLoader</code> method to ensure creation of a class loader is allowed. <p><DD><DL><DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent ClassLoader<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code>checkCreateClassLoader</code> method doesn't allow creation of a class loader.<DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkCreateClassLoader()"><CODE>SecurityManager.checkCreateClassLoader()</CODE></A></DL></DD></DL><HR><A NAME="SecureClassLoader()"><!-- --></A><H3>SecureClassLoader</H3><PRE>protected <B>SecureClassLoader</B>()</PRE><DL><DD>Creates a new SecureClassLoader using the default parent class loader for delegation. <p>If there is a security manager, this method first calls the security manager's <code>checkCreateClassLoader</code> method to ensure creation of a class loader is allowed.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code>checkCreateClassLoader</code> method doesn't allow creation of a class loader.<DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkCreateClassLoader()"><CODE>SecurityManager.checkCreateClassLoader()</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="defineClass(java.lang.String, byte[], int, int, java.security.CodeSource)"><!-- --></A><H3>defineClass</H3><PRE>protected final <A HREF="../../java/lang/Class.html">Class</A> <B>defineClass</B>(<A HREF="../../java/lang/String.html">String</A> name, byte[] b, int off, int len, <A HREF="../../java/security/CodeSource.html">CodeSource</A> cs)</PRE><DL><DD>Converts an array of bytes into an instance of class Class, with an optional CodeSource. Before the class can be used it must be resolved. <p> If a non-null CodeSource is supplied and a Policy provider is installed, Policy.getPermissions() is invoked in order to associate a ProtectionDomain with the class being defined. <p><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the class<DD><CODE>b</CODE> - the class bytes<DD><CODE>off</CODE> - the start offset of the class bytes<DD><CODE>len</CODE> - the length of the class bytes<DD><CODE>cs</CODE> - the associated CodeSource, or null if none<DT><B>Returns:</B><DD>the <code>Class</code> object created from the data, and optional CodeSource.</DL></DD></DL><HR><A NAME="getPermissions(java.security.CodeSource)"><!-- --></A><H3>getPermissions</H3><PRE>protected <A HREF="../../java/security/PermissionCollection.html">PermissionCollection</A> <B>getPermissions</B>(<A HREF="../../java/security/CodeSource.html">CodeSource</A> codesource)</PRE><DL><DD>Returns the permissions for the given CodeSource object. The default implementation of this method invokes the java.security.Policy.getPermissions method to get the permissions granted by the policy to the specified CodeSource. <p> This method is invoked by the defineClass method which takes a CodeSource as an argument when it is constructing the ProtectionDomain for the class being defined. <p> The constructed ProtectionDomain is cached by the SecureClassLoader. The contents of the cache persist for the lifetime of the SecureClassLoader instance. This persistence inhibits Policy.refresh() from influencing the protection domains already in the cache for a given CodeSource. <p><DD><DL><DT><B>Parameters:</B><DD><CODE>codesource</CODE> - the codesource.<DT><B>Returns:</B><DD>the permissions granted to the codesource.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SecureClassLoader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/security/Provider.html"><B>PREV CLASS</B></A> <A HREF="../../java/security/SecureRandom.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SecureClassLoader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -