加载中...
The Wayback Machine - https://sup1a9wrlpyh5li9ro.vcoronado.top/web/20090328124747/http://developer.android.com:80/reference/java/security/CodeSource.html
public class

CodeSource

extends Object
implements Serializable
java.lang.Object
   ↳ java.security.CodeSource

Summary

Public Constructors
CodeSource(URL location, Certificate[] certs)
Constructs a new instance of this class with its url and certificates fields filled in from the arguments.
CodeSource(URL location, CodeSigner[] signers)
Public Methods
boolean equals(Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
final Certificate[] getCertificates()
Returns the certificates held onto by the receiver.
final CodeSigner[] getCodeSigners()
final URL getLocation()
Returns the receiver's location.
int hashCode()
Returns an integer hash code for the receiver.
boolean implies(CodeSource cs)
Indicates whether the argument code source is implied by the receiver.
String toString()
Returns a string containing a concise, human-readable description of the receiver.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CodeSource (URL location, Certificate[] certs)

Constructs a new instance of this class with its url and certificates fields filled in from the arguments.

Parameters
location URL the URL.
certs Certificate[] the Certificates.

public CodeSource (URL location, CodeSigner[] signers)

Public Methods

public boolean equals (Object obj)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. In this case, the receiver and the object must have the same URL and the same collection of certificates.

Parameters
obj the object to compare with this object
Returns
  • true if the object is the same as this object false if it is different from this object
See Also

public final Certificate[] getCertificates ()

Returns the certificates held onto by the receiver.

Returns
  • Certificate[] the receiver's certificates

public final CodeSigner[] getCodeSigners ()

public final URL getLocation ()

Returns the receiver's location.

Returns
  • URL the receiver's URL

public int hashCode ()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Returns
  • int the receiver's hash.
See Also

public boolean implies (CodeSource cs)

Indicates whether the argument code source is implied by the receiver.

Parameters
cs CodeSource the code source to check
Returns
  • boolean true if the argument code source is implied by the receiver, and false if it is not.

public String toString ()

Returns a string containing a concise, human-readable description of the receiver.

Returns
  • a printable representation for the receiver.