Cryptix OpenPGP

cryptix.pki
Class KeyBundleFactory

java.lang.Object
  extended bycryptix.pki.KeyBundleFactory

public class KeyBundleFactory
extends java.lang.Object

A class for generating a KeyBundle

Version:
$Revision: 1.2 $
Author:
Edwin Woudt

Constructor Summary
protected KeyBundleFactory(KeyBundleFactorySpi builderSpi, java.security.Provider provider, java.lang.String format)
          Create a new KeyBundleFactory object containing the given SPI object.
 
Method Summary
 KeyBundle generateEmptyKeyBundle()
          Generates a new empty KeyBundle.
 KeyBundle generateKeyBundle(java.io.InputStream in)
          Generates a KeyBundle from an input stream.
 java.util.Collection generateKeyBundles(java.io.InputStream in)
          Generates a (possible empty) collection of keybundles from an input stream.
 java.lang.String getFormat()
          Returns the name of the format of this object.
static KeyBundleFactory getInstance(java.lang.String format)
          Returns a KeyBundleFactory that implements the given format.
static KeyBundleFactory getInstance(java.lang.String format, java.security.Provider provider)
          Returns a KeyBundleFactory from the given provider that implements the given format.
static KeyBundleFactory getInstance(java.lang.String format, java.lang.String provider)
          Returns a KeyBundleFactory from the given provider that implements the given format.
 java.security.Provider getProvider()
          Returns the provider of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyBundleFactory

protected KeyBundleFactory(KeyBundleFactorySpi builderSpi,
                           java.security.Provider provider,
                           java.lang.String format)
Create a new KeyBundleFactory object containing the given SPI object.

Method Detail

getInstance

public static KeyBundleFactory getInstance(java.lang.String format)
                                    throws java.security.NoSuchAlgorithmException
Returns a KeyBundleFactory that implements the given format.

Throws:
java.security.NoSuchAlgorithmException

getInstance

public static KeyBundleFactory getInstance(java.lang.String format,
                                           java.lang.String provider)
                                    throws java.security.NoSuchAlgorithmException,
                                           java.security.NoSuchProviderException
Returns a KeyBundleFactory from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException

getInstance

public static KeyBundleFactory getInstance(java.lang.String format,
                                           java.security.Provider provider)
                                    throws java.security.NoSuchAlgorithmException
Returns a KeyBundleFactory from the given provider that implements the given format.

Throws:
java.security.NoSuchAlgorithmException

getProvider

public final java.security.Provider getProvider()
Returns the provider of this object.


getFormat

public final java.lang.String getFormat()
Returns the name of the format of this object.


generateKeyBundles

public final java.util.Collection generateKeyBundles(java.io.InputStream in)
                                              throws KeyBundleException,
                                                     java.io.IOException
Generates a (possible empty) collection of keybundles from an input stream.

Note: the entire inputstream will be read when the inputstream does not support the mark() and reset() methods.

Throws:
KeyBundleException - on a variety of format specific problems.
java.io.IOException

generateKeyBundle

public final KeyBundle generateKeyBundle(java.io.InputStream in)
                                  throws KeyBundleException,
                                         java.io.IOException
Generates a KeyBundle from an input stream.

Note: the entire inputstream will be read when the inputstream does not support the mark() and reset() methods.

Throws:
KeyBundleException - on a variety of format specific problems.
java.io.IOException

generateEmptyKeyBundle

public final KeyBundle generateEmptyKeyBundle()
                                       throws KeyBundleException
Generates a new empty KeyBundle.

Throws:
KeyBundleException - on a variety of format specific problems.

Cryptix OpenPGP

Copyright (C) 1999-2003 The Cryptix Foundation Ltd.