Class PGPKeyRingCollection


  • public class PGPKeyRingCollection
    extends java.lang.Object
    This class describes a logic of handling a collection of different PGPKeyRing. The logic was inspired by PGPSecretKeyRingCollection and PGPPublicKeyRingCollection.
    • Constructor Detail

      • PGPKeyRingCollection

        public PGPKeyRingCollection​(@Nonnull
                                    byte[] encoding,
                                    boolean isSilent)
                             throws java.io.IOException,
                                    org.bouncycastle.openpgp.PGPException
        Throws:
        java.io.IOException
        org.bouncycastle.openpgp.PGPException
      • PGPKeyRingCollection

        public PGPKeyRingCollection​(@Nonnull
                                    java.io.InputStream in,
                                    boolean isSilent)
                             throws java.io.IOException,
                                    org.bouncycastle.openpgp.PGPException
        Build a PGPKeyRingCollection from the passed in input stream.
        Parameters:
        in - input stream containing data
        isSilent - flag indicating that unsupported objects will be ignored
        Throws:
        java.io.IOException - if a problem parsing the base stream occurs
        org.bouncycastle.openpgp.PGPException - if an object is encountered which isn't a PGPSecretKeyRing or PGPPublicKeyRing
      • PGPKeyRingCollection

        public PGPKeyRingCollection​(@Nonnull
                                    java.util.Collection<org.bouncycastle.openpgp.PGPKeyRing> collection,
                                    boolean isSilent)
                             throws java.io.IOException,
                                    org.bouncycastle.openpgp.PGPException
        Throws:
        java.io.IOException
        org.bouncycastle.openpgp.PGPException
    • Method Detail

      • getPGPSecretKeyRingCollection

        @Nonnull
        public org.bouncycastle.openpgp.PGPSecretKeyRingCollection getPGPSecretKeyRingCollection()
      • getPgpPublicKeyRingCollection

        @Nonnull
        public org.bouncycastle.openpgp.PGPPublicKeyRingCollection getPgpPublicKeyRingCollection()
      • size

        public int size()
        Return the number of rings in this collection.
        Returns:
        total size of PGPSecretKeyRingCollection and PGPPublicKeyRingCollection in this collection