gnu.java.security.x509

Class X509CertPath

Implemented Interfaces:
Serializable

public class X509CertPath
extends CertPath

A certificate path (or certificate chain) of X509Certificates.
See Also:
Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class java.security.cert.CertPath

CertPath.CertPathRep

Field Summary

static List<E>
ENCODINGS

Constructor Summary

X509CertPath(InputStream in)
X509CertPath(InputStream in, String encoding)
X509CertPath(List<E> path)

Method Summary

List<E>
getCertificates()
byte[]
getEncoded()
Returns the encoded form of this path, via the default encoding.
byte[]
getEncoded(String encoding)
Returns the encoded form of this path, via the specified encoding.
Iterator<E>
getEncodings()
Get an immutable iterator over the path encodings (all String names), starting with the default encoding.

Methods inherited from class java.security.cert.CertPath

equals, extends Certificate> getCertificates, getEncoded, getEncoded, getEncodings, getType, hashCode, toString, writeReplace

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ENCODINGS

public static final List<E> ENCODINGS

Constructor Details

X509CertPath

public X509CertPath(InputStream in)
            throws CertificateEncodingException

X509CertPath

public X509CertPath(InputStream in,
                    String encoding)
            throws CertificateEncodingException

X509CertPath

public X509CertPath(List<E> path)

Method Details

getCertificates

public List<E> getCertificates()

getEncoded

public byte[] getEncoded()
            throws CertificateEncodingException
Returns the encoded form of this path, via the default encoding.
Overrides:
getEncoded in interface CertPath
Returns:
the encoded form
Throws:
CertificateEncodingException - if encoding fails

getEncoded

public byte[] getEncoded(String encoding)
            throws CertificateEncodingException
Returns the encoded form of this path, via the specified encoding.
Overrides:
getEncoded in interface CertPath
Parameters:
encoding - the encoding to use
Returns:
the encoded form
Throws:
CertificateEncodingException - if encoding fails or does not exist

getEncodings

public Iterator<E> getEncodings()
Get an immutable iterator over the path encodings (all String names), starting with the default encoding. The iterator will throw an UnsupportedOperationException if an attempt is made to remove items from the list.
Overrides:
getEncodings in interface CertPath
Returns:
the iterator of supported encodings in the path

X509CertPath.java -- an X.509 certificate path. Copyright (C) 2004 Free Software Fonudation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.