| public class java.security CodeSource
|
Java SE 6 |
This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.
| version | 1.41, 11/17/05 |
| Constructors | |||||||
|---|---|---|---|---|---|---|---|
| public | CodeSource(URL url, Certificate[] certs) Details
Constructs a CodeSource and associates it with the specified
location and set of certificates.
| ||||||
| public | CodeSource(URL url, CodeSigner[] signers) Details
Constructs a CodeSource and associates it with the specified
location and set of code signers.
| ||||||
| Methods | |||||
|---|---|---|---|---|---|
| public boolean | equals(Object obj) Details
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 their signer certificate
chains are of identical value. It is not required that
the certificate chains be in the same order.
| ||||
| public int | hashCode() Details
Returns the hash code value for this object.
| ||||
| public boolean | implies(CodeSource codesource) Details
Returns true if this CodeSource object "implies" the specified CodeSource.
More specifically, this method makes the following checks, in order. If any fail, it returns false. If they all succeed, it returns true.
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:
http:
http://*.sun.com/classes/*
http://java.sun.com/classes/-
http://java.sun.com/classes/foo.jar
Note that if this CodeSource has a null location and a null
certificate chain, then it implies every other CodeSource.
| ||||
| public String | toString() Details
Returns a string describing this CodeSource, telling its
URL and certificates.
| ||||
| Properties | |||||
|---|---|---|---|---|---|
| final public Certificate[] | getCertificates() Details
Returns the certificates associated with this CodeSource.
If this CodeSource object was created using the
| ||||
| final public CodeSigner[] | getCodeSigners() Details
Returns the code signers associated with this CodeSource.
If this CodeSource object was created using the
| ||||
| final public URL | getLocation() Details
Returns the location associated with this CodeSource.
| ||||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|