Java Doc for CodeSource.java in  » 6.0-JDK-Modules » j2me » java » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.security.CodeSource

CodeSource
public class CodeSource implements java.io.Serializable(Code)

This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.
version:
   1.28, 02/02/00
author:
   Li Gong
author:
   Roland Schemers




Constructor Summary
public  CodeSource(URL url, java.security.cert.Certificate certs)
     Constructs a CodeSource and associates it with the specified location and set of certificates.

Method Summary
public  booleanequals(Object obj)
     Tests for equality between the specified object and this object.
final public  java.security.cert.Certificate[]getCertificates()
     Returns the certificates associated with this CodeSource.
final public  URLgetLocation()
     Returns the location associated with this CodeSource.
public  inthashCode()
     Returns the hash code value for this object.
public  booleanimplies(CodeSource codesource)
     Returns true if this CodeSource object "implies" the specified CodeSource.

More specifically, this method makes the following checks, in order.

public  StringtoString()
     Returns a string describing this CodeSource, telling its URL and certificates.


Constructor Detail
CodeSource
public CodeSource(URL url, java.security.cert.Certificate certs)(Code)
Constructs a CodeSource and associates it with the specified location and set of certificates.
Parameters:
  url - the location (URL).
Parameters:
  certs - the certificate(s).




Method Detail
equals
public boolean equals(Object obj)(Code)
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 certificates are of identical values. It is not required that the certificates be in the same order.
Parameters:
  obj - the object to test for equality with this object. true if the objects are considered equal, false otherwise.



getCertificates
final public java.security.cert.Certificate[] getCertificates()(Code)
Returns the certificates associated with this CodeSource. the certificates



getLocation
final public URL getLocation()(Code)
Returns the location associated with this CodeSource. the location (URL).



hashCode
public int hashCode()(Code)
Returns the hash code value for this object. a hash code value for this object.



implies
public boolean implies(CodeSource codesource)(Code)
Returns true if this CodeSource object "implies" the specified CodeSource.

More specifically, this method makes the following checks, in order. If any fail, it returns false. If they all succeed, it returns true.

  1. codesource must not be null.
  2. If this object's certificates are not null, then all of this object's certificates must be present in codesource's certificates.
  3. If this object's location (getLocation()) is not null, then the following checks are made against this object's location and codesource's:

    1. codesource's location must not be null.
    2. If this object's location equals codesource's location, then return true.
    3. This object's protocol (getLocation().getProtocol()) must be equal to codesource's protocol.
    4. If this object's host (getLocation().getHost()) is not null, then the SocketPermission constructed with this object's host must imply the SocketPermission constructed with codesource's host.
    5. If this object's port (getLocation().getPort()) is not equal to -1 (that is, if a port is specified), it must equal codesource's port.
    6. If this object's file (getLocation().getFile()) doesn't equal codesource's file, then the following checks are made: If this object's file ends with "/-", then codesource's file must start with this object's file (exclusive the trailing "-"). If this object's file ends with a "/*", then codesource's file must start with this object's file and must not have any further "/" separators. If this object's file doesn't end with a "/", then codesource's file must match this object's file with a '/' appended.
    7. If this object's reference (getLocation().getRef()) is not null, it must equal codesource's reference.

For example, the codesource objects with the following locations and null certificates all imply the codesource with the location "http://java.sun.com/classes/foo.jar" and null certificates:

 http:
 http://*.sun.com/classes/*
 http://java.sun.com/classes/-
 http://java.sun.com/classes/foo.jar
 
Note that if this CodeSource has a null location and a null certificate chain, then it implies every other CodeSource.
Parameters:
  codesource - CodeSource to compare against. true if the specified codesource is implied by this codesource,false if not.



toString
public String toString()(Code)
Returns a string describing this CodeSource, telling its URL and certificates. information about this CodeSource.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.