1 
2 package java.security.cert;
3 
4 import java.io.InputStream;
5 import java.util.Collection;
6 import java.util.Iterator;
7 import java.util.List;
8 
9 public abstract class CertificateFactorySpi
10 {
CertificateFactorySpi()11     public CertificateFactorySpi()
12     {
13     }
14 
engineGenerateCRL(InputStream inStream)15     public abstract CRL engineGenerateCRL(InputStream inStream)
16         throws CRLException;
17 
engineGenerateCRLs(InputStream inStream)18     public abstract Collection engineGenerateCRLs(InputStream inStream)
19         throws CRLException;
20 
engineGenerateCertificate(InputStream inStream)21     public abstract Certificate engineGenerateCertificate(InputStream inStream)
22         throws CertificateException;
23 
engineGenerateCertificates(InputStream inStream)24     public abstract /*SK13 Vector*/ Collection engineGenerateCertificates(InputStream inStream)
25         throws CertificateException;
26 
27     /**
28      * Returns an iteration of the <code>CertPath</code> encodings supported
29      * by this certificate factory, with the default encoding first. See
30      * Appendix A in the
31      * Java Certification Path API Programmer's Guide
32      * for information about standard encoding names.<br />
33      * <br />
34      * Attempts to modify the returned <code>Iterator</code> via its
35      * <code>remove</code> method result in an
36      * <code>UnsupportedOperationException</code>.<br />
37      * <br />
38      * This method was added to version 1.4 of the Java 2 Platform
39      * Standard Edition. In order to maintain backwards compatibility with
40      * existing service providers, this method cannot be <code>abstract</code>
41      * and by default throws an <code>UnsupportedOperationException</code>.
42      *
43      * @return an <code>Iterator</code> over the names of the supported
44      *         <code>CertPath</code> encodings (as <code>String</code>s)
45      *
46      * @exception UnsupportedOperationException if the method is not supported
47      */
engineGetCertPathEncodings()48     public abstract Iterator engineGetCertPathEncodings();
49 
50     /**
51      * Generates a <code>CertPath</code> object and initializes it with
52      * the data read from the <code>InputStream</code> inStream. The data
53      * is assumed to be in the default encoding.
54      *
55      * @param inStream an <code>InputStream</code> containing the data
56      *
57      * @return a <code>CertPath</code> initialized with the data from the
58      *   <code>InputStream</code>
59      *
60      * @exception CertificateException if an exception occurs while decoding
61      */
engineGenerateCertPath(InputStream inStream)62     public abstract CertPath engineGenerateCertPath(InputStream inStream)
63         throws CertificateException;
64 
65     /**
66      * Generates a <code>CertPath</code> object and initializes it with
67      * the data read from the <code>InputStream</code> inStream. The data
68      * is assumed to be in the specified encoding.<br />
69      * <br />
70      * This method was added to version 1.4 of the Java 2 Platform
71      * Standard Edition. In order to maintain backwards compatibility with
72      * existing service providers, this method cannot be <code>abstract</code>
73      * and by default throws an <code>UnsupportedOperationException</code>.
74      *
75      * @param inStream an <code>InputStream</code> containing the data
76      * @param encoding the encoding used for the data
77      *
78      * @return a <code>CertPath</code> initialized with the data from the
79      *   <code>InputStream</code>
80      *
81      * @exception CertificateException if an exception occurs while decoding or
82      *   the encoding requested is not supported
83      * @exception UnsupportedOperationException if the method is not supported
84      */
engineGenerateCertPath(InputStream inStream, String encoding)85     public abstract CertPath engineGenerateCertPath(InputStream inStream, String encoding)
86         throws CertificateException;
87 
88     /**
89      * Generates a <code>CertPath</code> object and initializes it with
90      * a <code>List</code> of <code>Certificate</code>s.<br />
91      * <br />
92      * The certificates supplied must be of a type supported by the
93      * <code>CertificateFactory</code>. They will be copied out of the supplied
94      * <code>List</code> object.<br />
95      * <br />
96      * This method was added to version 1.4 of the Java 2 Platform
97      * Standard Edition. In order to maintain backwards compatibility with
98      * existing service providers, this method cannot be <code>abstract</code>
99      * and by default throws an <code>UnsupportedOperationException</code>.
100      *
101      * @param certificates a <code>List</code> of <code>Certificate</code>s
102      *
103      * @return a <code>CertPath</code> initialized with the supplied list of
104      *   certificates
105      *
106      * @exception CertificateException if an exception occurs
107      * @exception UnsupportedOperationException if the method is not supported
108      */
engineGenerateCertPath(List certificates)109     public abstract CertPath engineGenerateCertPath(List certificates)
110         throws CertificateException;
111 }
112