|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.CodeSource
public class CodeSource
This class represents a location from which code is loaded (as represented by a URL), and the list of certificates that are used to check the signatures of signed code loaded from this source.
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CodeSource(URL location, Certificate[] certs)
CodeSource
that loads code
from the specified URL location and which uses the specified certificates
for verifying signatures.
location
- the location from which code will be loadedcerts
- the list of certificatesMethod Detail |
---|
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)
public boolean equals(Object obj)
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).
equals
in class Object
obj
- the Object
to test against
Object.hashCode()
public final URL getLocation()
CodeSource
.
CodeSource
public final Certificate[] getCertificates()
CodeSource
.
CodeSource
public boolean implies(CodeSource cs)
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.
cs
- the CodeSource
to test against this object
CodeSource
is impliedpublic String toString()
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 ")"
.
toString
in class Object
String
for this objectObject.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |