Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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 Summary
 CodeSource(URL url, PublicKey[] key)
Constructs a CodeSource and associates it with the specified location and set of public keys.
 

Method Summary
boolean  equals(Object obj)
Tests for equality between the specified object and this object.
PublicKey[]  getKeys()
Returns the public keys associated with this CodeSource.
URL  getLocation()
Returns the location associated with this CodeSource.
int  hashCode()
Returns the hash code value for this object.
String  toString()
Returns a string describing this CodeSource, telling its URL and public keys.
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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).
Method Detail

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

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.