📄 codesource.html
字号:
<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="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns the hash code value for this object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#hashCode()">hashCode</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a hash code value for this object.</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Tests for equality between the specified object and this object. Two CodeSource objects are considered equal if their locations are of identical value and if the two sets of certificates are of identical values. It is not required that the certificates be in the same order.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - the object to test for equality with this object.<DT><B>Returns:</B><DD>true if the objects are considered equal, false otherwise.</DL></DD></DL><HR><A NAME="getLocation()"><!-- --></A><H3>getLocation</H3><PRE>public final <A HREF="../../java/net/URL.html">URL</A> <B>getLocation</B>()</PRE><DL><DD>Returns the location associated with this CodeSource.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the location (URL).</DL></DD></DL><HR><A NAME="getCertificates()"><!-- --></A><H3>getCertificates</H3><PRE>public final <A HREF="../../java/security/cert/Certificate.html">Certificate</A>[] <B>getCertificates</B>()</PRE><DL><DD>Returns the certificates associated with this CodeSource.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the certificates</DL></DD></DL><HR><A NAME="implies(java.security.CodeSource)"><!-- --></A><H3>implies</H3><PRE>public boolean <B>implies</B>(<A HREF="../../java/security/CodeSource.html">CodeSource</A> codesource)</PRE><DL><DD>Returns true if this CodeSource object "implies" the specified CodeSource. <P> More specifically, this method makes the following checks, in order. If any fail, it returns false. If they all succeed, it returns true.<p> <ol> <li> <i>codesource</i> must not be null. <li> If this object's certificates are not null, then all of this object's certificates must be present in <i>codesource</i>'s certificates. <li> If this object's location (getLocation()) is not null, then the following checks are made against this object's location and <i>codesource</i>'s:<p> <ol> <li> <i>codesource</i>'s location must not be null. <li> If this object's location equals <i>codesource</i>'s location, then return true. <li> This object's protocol (getLocation().getProtocol()) must be equal to <i>codesource</i>'s protocol. <li> If this object's host (getLocation().getHost()) is not null, then the SocketPermission constructed with this object's host must imply the SocketPermission constructed with <i>codesource</i>'s host. <li> If this object's port (getLocation().getPort()) is not equal to -1 (that is, if a port is specified), it must equal <i>codesource</i>'s port. <li> If this object's file (getLocation().getFile()) doesn't equal <i>codesource</i>'s file, then the following checks are made: If this object's file ends with "/-", then <i>codesource</i>'s file must start with this object's file (exclusive the trailing "-"). If this object's file ends with a "/*", then <i>codesource</i>'s file must start with this object's file and must not have any further "/" separators. If this object's file doesn't end with a "/", then <i>codesource</i>'s file must match this object's file with a '/' appended. <li> If this object's reference (getLocation().getRef()) is not null, it must equal <i>codesource</i>'s reference. </ol> </ol> <p> For example, the codesource objects with the following locations and null certificates all imply the codesource with the location "http://java.sun.com/classes/foo.jar" and null certificates: <pre> http: http://*.sun.com/classes/* http://java.sun.com/classes/- http://java.sun.com/classes/foo.jar </pre><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>codesource</CODE> - CodeSource to compare against.<DT><B>Returns:</B><DD>true if the specified codesource is implied by this codesource, false if not.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Returns a string describing this CodeSource, telling its URL and certificates.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>information about this 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/CodeSource.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/BasicPermission.html"><B>PREV CLASS</B></A> <A HREF="../../java/security/DigestInputStream.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="CodeSource.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 + -