Class PGPObjectFactory

    • Constructor Detail

      • PGPObjectFactory

        public PGPObjectFactory​(InputStream in,
                                KeyFingerPrintCalculator fingerPrintCalculator)
        Create an object factory suitable for reading PGP objects such as keys, key rings and key ring collections, or PGP encrypted data.
        Parameters:
        in - stream to read PGP data from.
        fingerPrintCalculator - calculator to use in key finger print calculations.
      • PGPObjectFactory

        public PGPObjectFactory​(byte[] bytes,
                                KeyFingerPrintCalculator fingerPrintCalculator)
        Create an object factory suitable for reading PGP objects such as keys, key rings and key ring collections, or PGP encrypted data.
        Parameters:
        bytes - PGP encoded data.
        fingerPrintCalculator - calculator to use in key finger print calculations.
    • Method Detail

      • nextObject

        public Object nextObject()
                          throws IOException
        Return the next object in the stream, or null if the end of stream is reached.
        Returns:
        one of the supported objects - see class docs for details.
        Throws:
        IOException - if an error occurs reading from the wrapped stream or parsing data.
      • iterator

        public Iterator iterator()
        Support method for Iterable where available.
        Specified by:
        iterator in interface Iterable
        Specified by:
        iterator in interface org.bouncycastle.util.Iterable