java.security
public class CodeSource extends Object implements Serializable
Since: 1.1
UNKNOWN: updated to 1.4
Constructor Summary | |
---|---|
CodeSource(URL location, Certificate[] certs)
This creates a new instance of CodeSource that loads code
from the specified URL location and which uses the specified certificates
for verifying signatures.
|
Method Summary | |
---|---|
boolean | equals(Object obj)
This method tests the specified Object for equality with
this object. |
Certificate[] | getCertificates()
This method returns the list of digital certificates that can be used
to verify the signatures of code loaded under this
CodeSource .
|
URL | getLocation()
This method returns the URL specifying the location from which code
will be loaded under this CodeSource .
|
int | hashCode()
This method returns a hash value for this object.
|
boolean | implies(CodeSource cs)
This method tests to see if a specified CodeSource is
implied by this object. |
String | toString()
This method returns a String that represents this object.
|
CodeSource
that loads code
from the specified URL location and which uses the specified certificates
for verifying signatures.
Parameters: location the location from which code will be loaded certs the list of certificates
Object
for equality with
this object. This will be true if and only if the locations are equal
and the certificate sets are identical (ignoring order).
Parameters: obj the Object
to test against
Returns: true if the specified object is equal to this one
CodeSource
.
Returns: the certifcate list for this CodeSource
CodeSource
.
Returns: the code location for this CodeSource
Returns: a hash value for this object
CodeSource
is
implied by this object. Effectively, to meet this test, the specified
object must have all the certifcates this object has (but may have more),
and must have a location that is a subset of this object's. In order
for this object to imply the specified object, the following must be
true:
null
.null
location, then
the following addtional tests must be passed.
null
location.SocketPermission
objects from each with no
action list and using that classes's implies
methodFor example, each of these locations imply the location "http://java.sun.com/classes/foo.jar":
http: http://*.sun.com/classes/* http://java.sun.com/classes/- http://java.sun.com/classes/foo.jar
Note that the code source with null location and null certificates implies all other code sources.
Parameters: cs the CodeSource
to test against this object
Returns: true if this specified CodeSource
is implied
String
that represents this object.
The result is in the format "(" + getLocation()
followed
by a space separated list of certificates (or "<no certificates>"),
followed by ")"
.
Returns: a String
for this object