org.bouncycastle.openpgp
public class PGPPublicKeyRingCollection extends Object
| Constructor Summary | |
|---|---|
| PGPPublicKeyRingCollection(byte[] encoding) | |
| PGPPublicKeyRingCollection(InputStream in)
Build a PGPPublicKeyRingCollection from the passed in input stream.
| |
| PGPPublicKeyRingCollection(Collection collection) | |
| Method Summary | |
|---|---|
| static PGPPublicKeyRingCollection | addPublicKeyRing(PGPPublicKeyRingCollection ringCollection, PGPPublicKeyRing publicKeyRing)
Return a new collection object containing the contents of the passed in collection and
the passed in public key ring.
|
| void | encode(OutputStream outStream) |
| byte[] | getEncoded() |
| Iterator | getKeyRings()
return the public key rings making up this collection. |
| Iterator | getKeyRings(String userID, boolean matchPartial)
Return an iterator of the key rings associated with the passed in userID.
|
| Iterator | getKeyRings(String userID)
Return an iterator of the key rings associated with the passed in userID.
|
| PGPPublicKey | getPublicKey(long keyID)
Return the PGP public key associated with the given key id.
|
| PGPPublicKeyRing | getPublicKeyRing(long keyID)
Return the public key ring which contains the key referred to by keyID.
|
| static PGPPublicKeyRingCollection | removePublicKeyRing(PGPPublicKeyRingCollection ringCollection, PGPPublicKeyRing publicKeyRing)
Return a new collection object containing the contents of this collection with
the passed in public key ring removed.
|
| int | size()
Return the number of rings in this collection.
|
Parameters: in input stream containing data
Throws: IOException if a problem parsinh the base stream occurs PGPException if an object is encountered which isn't a PGPPublicKeyRing
Parameters: ringCollection the collection the ring to be added to. publicKeyRing the key ring to be added.
Returns: a new collection merging the current one with the passed in ring.
Throws: IllegalArgumentException if the keyID for the passed in ring is already present.
Parameters: userID the user ID to be matched. matchPartial if true userID need only be a substring of an actual ID string to match.
Returns: an iterator (possibly empty) of key rings which matched.
Throws: PGPException
Parameters: userID the user ID to be matched.
Returns: an iterator (possibly empty) of key rings which matched.
Throws: PGPException
Parameters: keyID
Returns: the PGP public key
Throws: PGPException
Parameters: keyID
Returns: the public key ring
Throws: PGPException
Parameters: ringCollection the collection the ring to be removed from. publicKeyRing the key ring to be removed.
Returns: a new collection not containing the passed in ring.
Throws: IllegalArgumentException if the keyID for the passed in ring not present.
Returns: size of the collection