All Packages Class Hierarchy This Package Previous Next Index
Class java.security.CodeSource
java.lang.Object
|
+----java.security.CodeSource
- public class CodeSource
- extends Object
- implements Serializable
This class extends the concept of a codebase to
encapsulate not only the location (URL) but also the public key(s)
that should be used to verify signed code originating from that
location.
Two CodeSource objects are considered equal if their locations
are of identical value and if the two sets of public keys are of
identical values.
CodeSource(URL, PublicKey[])
- Constructs a CodeSource and associates it with the specified
location and set of public keys.
equals(Object)
- Tests for equality between the specified object and this
object.
getKeys()
- Returns the public keys associated with this CodeSource.
getLocation()
- Returns the location associated with this CodeSource.
hashCode()
- Returns the hash code value for this object.
toString()
- Returns a string describing this CodeSource, telling its
URL and public keys.
CodeSource
public CodeSource(URL url,
PublicKey[] key)
- Constructs a CodeSource and associates it with the specified
location and set of public keys.
- Parameters:
- url - the location (URL).
- key - the public key(s).
hashCode
public int hashCode()
- Returns the hash code value for this object.
- Returns:
- a hash code value for this object.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object obj)
- 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
public keys are of identical values. It is not required that
the keys be in the same order.
- Parameters:
- obj - the object to test for equality with this object.
- Returns:
- true if the objects are considered equal, false otherwise.
- Overrides:
- equals in class Object
getLocation
public final URL getLocation()
- Returns the location associated with this CodeSource.
- Returns:
- the location (URL).
getKeys
public final PublicKey[] getKeys()
- Returns the public keys associated with this CodeSource.
- Returns:
- the public keys.
toString
public String toString()
- Returns a string describing this CodeSource, telling its
URL and public keys.
- Returns:
- information about this CodeSource.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature