@SuppressWarnings("unchecked")
public License loadKey(final InputStream inputStream, final String userId)
throws IOException, PGPException {
final InputStream decoderInputStream = PGPUtil.getDecoderStream(inputStream);
final PGPSecretKeyRingCollection pgpSec = new JcaPGPSecretKeyRingCollection(decoderInputStream);
key = null;
for (final PGPSecretKeyRing kRing : in((Iterator<PGPSecretKeyRing>) pgpSec
.getKeyRings())) {
for (final PGPSecretKey k : in((Iterator<PGPSecretKey>) kRing
.getSecretKeys())) {
for (final String keyUserId : in((Iterator<String>) k
.getUserIDs())) {