Java Doc for Certificate.java in  » 6.0-JDK-Core » security » java » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » security » java.security 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.security.Certificate

Certificate
public interface Certificate (Code)

This is an interface of abstract methods for managing a variety of identity certificates. An identity certificate is a guarantee by a principal that a public key is that of another principal. (A principal represents an entity such as an individual user, a group, or a corporation.)

In particular, this interface is intended to be a common abstraction for constructs that have different formats but important common uses. For example, different types of certificates, such as X.509 certificates and PGP certificates, share general certificate functionality (the need to encode and decode certificates) and some types of information, such as a public key, the principal whose key it is, and the guarantor guaranteeing that the public key is that of the specified principal. So an implementation of X.509 certificates and an implementation of PGP certificates can both utilize the Certificate interface, even though their formats and additional types and amounts of information stored are different.

Important: This interface is useful for cataloging and grouping objects sharing certain common uses. It does not have any semantics of its own. In particular, a Certificate object does not make any statement as to the validity of the binding. It is the duty of the application implementing this interface to verify the certificate and satisfy itself of its validity.
version:
   1.45, 05/05/07
author:
   Benjamin Renaud
See Also:   java.security.cert.Certificate





Method Summary
abstract public  voiddecode(InputStream stream)
     Decodes a certificate from an input stream.
abstract public  voidencode(OutputStream stream)
     Encodes the certificate to an output stream in a format that can be decoded by the decode method.
abstract public  StringgetFormat()
     Returns the name of the coding format.
abstract public  PrincipalgetGuarantor()
     Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate.
abstract public  PrincipalgetPrincipal()
     Returns the principal of the principal-key pair being guaranteed by the guarantor. the principal to which this certificate is bound.
abstract public  PublicKeygetPublicKey()
     Returns the key of the principal-key pair being guaranteed by the guarantor. the public key that this certificate certifies belongsto a particular principal.
public  StringtoString(boolean detailed)
     Returns a string that represents the contents of the certificate.



Method Detail
decode
abstract public void decode(InputStream stream) throws KeyException, IOException(Code)
Decodes a certificate from an input stream. The format should be that returned by getFormat and produced by encode.
Parameters:
  stream - the input stream from which to fetch the databeing decoded.
exception:
  KeyException - if the certificate is not properly initialized,or data is missing, etc.
exception:
  IOException - if an exception occurs while trying to inputthe encoded certificate from the input stream.
See Also:   Certificate.encode
See Also:   
See Also:   Certificate.getFormat



encode
abstract public void encode(OutputStream stream) throws KeyException, IOException(Code)
Encodes the certificate to an output stream in a format that can be decoded by the decode method.
Parameters:
  stream - the output stream to which to encode thecertificate.
exception:
  KeyException - if the certificate is notproperly initialized, or data is missing, etc.
exception:
  IOException - if a stream exception occurs whiletrying to output the encoded certificate to the output stream.
See Also:   Certificate.decode
See Also:   
See Also:   Certificate.getFormat



getFormat
abstract public String getFormat()(Code)
Returns the name of the coding format. This is used as a hint to find an appropriate parser. It could be "X.509", "PGP", etc. This is the format produced and understood by the encode and decode methods. the name of the coding format.



getGuarantor
abstract public Principal getGuarantor()(Code)
Returns the guarantor of the certificate, that is, the principal guaranteeing that the public key associated with this certificate is that of the principal associated with this certificate. For X.509 certificates, the guarantor will typically be a Certificate Authority (such as the United States Postal Service or Verisign, Inc.). the guarantor which guaranteed the principal-keybinding.



getPrincipal
abstract public Principal getPrincipal()(Code)
Returns the principal of the principal-key pair being guaranteed by the guarantor. the principal to which this certificate is bound.



getPublicKey
abstract public PublicKey getPublicKey()(Code)
Returns the key of the principal-key pair being guaranteed by the guarantor. the public key that this certificate certifies belongsto a particular principal.



toString
public String toString(boolean detailed)(Code)
Returns a string that represents the contents of the certificate.
Parameters:
  detailed - whether or not to give detailed informationabout the certificate a string representing the contents of the certificate



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