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.


Constructor Index

 o CodeSource(URL, PublicKey[])
Constructs a CodeSource and associates it with the specified location and set of public keys.

Method Index

 o equals(Object)
Tests for equality between the specified object and this object.
 o getKeys()
Returns the public keys associated with this CodeSource.
 o getLocation()
Returns the location associated with this CodeSource.
 o hashCode()
Returns the hash code value for this object.
 o toString()
Returns a string describing this CodeSource, telling its URL and public keys.

Constructors

 o 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).

Methods

 o 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
 o 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
 o getLocation
public final URL getLocation()
Returns the location associated with this CodeSource.

Returns:
the location (URL).
 o getKeys
public final PublicKey[] getKeys()
Returns the public keys associated with this CodeSource.

Returns:
the public keys.
 o 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