Package org.pgpainless.key.collection
Class PGPKeyRingCollection
- java.lang.Object
-
- org.pgpainless.key.collection.PGPKeyRingCollection
-
public class PGPKeyRingCollection extends java.lang.ObjectThis class describes a logic of handling a collection of differentPGPKeyRing. The logic was inspired byPGPSecretKeyRingCollectionandPGPPublicKeyRingCollection.
-
-
Constructor Summary
Constructors Constructor Description PGPKeyRingCollection(byte[] encoding, boolean isSilent)PGPKeyRingCollection(java.io.InputStream in, boolean isSilent)Build aPGPKeyRingCollectionfrom the passed in input stream.PGPKeyRingCollection(java.util.Collection<org.bouncycastle.openpgp.PGPKeyRing> collection, boolean isSilent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.PGPPublicKeyRingCollectiongetPgpPublicKeyRingCollection()org.bouncycastle.openpgp.PGPSecretKeyRingCollectiongetPGPSecretKeyRingCollection()intsize()Return the number of rings in this collection.
-
-
-
Constructor Detail
-
PGPKeyRingCollection
public PGPKeyRingCollection(@Nonnull byte[] encoding, boolean isSilent) throws java.io.IOException, org.bouncycastle.openpgp.PGPException- Throws:
java.io.IOExceptionorg.bouncycastle.openpgp.PGPException
-
PGPKeyRingCollection
public PGPKeyRingCollection(@Nonnull java.io.InputStream in, boolean isSilent) throws java.io.IOException, org.bouncycastle.openpgp.PGPExceptionBuild aPGPKeyRingCollectionfrom the passed in input stream.- Parameters:
in- input stream containing dataisSilent- flag indicating that unsupported objects will be ignored- Throws:
java.io.IOException- if a problem parsing the base stream occursorg.bouncycastle.openpgp.PGPException- if an object is encountered which isn't aPGPSecretKeyRingorPGPPublicKeyRing
-
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.IOExceptionorg.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
PGPSecretKeyRingCollectionandPGPPublicKeyRingCollectionin this collection
-
-