equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
94 */ |
94 */ |
95 public abstract PublicKey getPublicKey(); |
95 public abstract PublicKey getPublicKey(); |
96 |
96 |
97 /** |
97 /** |
98 * Encodes the certificate to an output stream in a format that can |
98 * Encodes the certificate to an output stream in a format that can |
99 * be decoded by the <code>decode</code> method. |
99 * be decoded by the {@code decode} method. |
100 * |
100 * |
101 * @param stream the output stream to which to encode the |
101 * @param stream the output stream to which to encode the |
102 * certificate. |
102 * certificate. |
103 * |
103 * |
104 * @exception KeyException if the certificate is not |
104 * @exception KeyException if the certificate is not |
113 public abstract void encode(OutputStream stream) |
113 public abstract void encode(OutputStream stream) |
114 throws KeyException, IOException; |
114 throws KeyException, IOException; |
115 |
115 |
116 /** |
116 /** |
117 * Decodes a certificate from an input stream. The format should be |
117 * Decodes a certificate from an input stream. The format should be |
118 * that returned by <code>getFormat</code> and produced by |
118 * that returned by {@code getFormat} and produced by |
119 * <code>encode</code>. |
119 * {@code encode}. |
120 * |
120 * |
121 * @param stream the input stream from which to fetch the data |
121 * @param stream the input stream from which to fetch the data |
122 * being decoded. |
122 * being decoded. |
123 * |
123 * |
124 * @exception KeyException if the certificate is not properly initialized, |
124 * @exception KeyException if the certificate is not properly initialized, |
135 |
135 |
136 |
136 |
137 /** |
137 /** |
138 * Returns the name of the coding format. This is used as a hint to find |
138 * Returns the name of the coding format. This is used as a hint to find |
139 * an appropriate parser. It could be "X.509", "PGP", etc. This is |
139 * an appropriate parser. It could be "X.509", "PGP", etc. This is |
140 * the format produced and understood by the <code>encode</code> |
140 * the format produced and understood by the {@code encode} |
141 * and <code>decode</code> methods. |
141 * and {@code decode} methods. |
142 * |
142 * |
143 * @return the name of the coding format. |
143 * @return the name of the coding format. |
144 */ |
144 */ |
145 public abstract String getFormat(); |
145 public abstract String getFormat(); |
146 |
146 |