org.bouncycastle.openpgp

Class PGPObjectFactory

public class PGPObjectFactory extends Object

General class for reading a PGP object stream.

Note: if this class finds a PGPPublicKey or a PGPSecretKey it will create a PGPPublicKeyRing, or a PGPSecretKeyRing for each key found. If all you are trying to do is read a key ring file use either PGPPublicKeyRingCollection or PGPSecretKeyRingCollection.

Constructor Summary
PGPObjectFactory(InputStream in)
PGPObjectFactory(byte[] bytes)
Method Summary
ObjectnextObject()
Return the next object in the stream, or null if the end is reached.

Constructor Detail

PGPObjectFactory

public PGPObjectFactory(InputStream in)

PGPObjectFactory

public PGPObjectFactory(byte[] bytes)

Method Detail

nextObject

public Object nextObject()
Return the next object in the stream, or null if the end is reached.

Returns: Object

Throws: IOException on a parse error