mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-10 06:11:08 +01:00
KeyRingReader: Remove unused @throws IOException
This commit is contained in:
parent
fb581f11c7
commit
005b9d477a
8 changed files with 14 additions and 25 deletions
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
package org.pgpainless.encryption_signing;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.security.MessageDigest;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.bouncycastle.crypto.Digest;
|
||||
import org.bouncycastle.crypto.Signer;
|
||||
|
|
@ -23,18 +23,15 @@ abstract class PGPHashContextContentSignerBuilder implements PGPContentSignerBui
|
|||
this.sig = sig;
|
||||
}
|
||||
|
||||
public void write(byte[] bytes, int off, int len)
|
||||
throws IOException {
|
||||
public void write(@Nonnull byte[] bytes, int off, int len) {
|
||||
sig.update(bytes, off, len);
|
||||
}
|
||||
|
||||
public void write(byte[] bytes)
|
||||
throws IOException {
|
||||
public void write(@Nonnull byte[] bytes) {
|
||||
sig.update(bytes, 0, bytes.length);
|
||||
}
|
||||
|
||||
public void write(int b)
|
||||
throws IOException {
|
||||
public void write(int b) {
|
||||
sig.update((byte) b);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public interface SecretKeyRingEditorInterface {
|
|||
@Nonnull SecretKeyRingProtector primaryKeyProtector,
|
||||
@Nonnull KeyFlag keyFlag,
|
||||
KeyFlag... additionalKeyFlags)
|
||||
throws PGPException, IOException, NoSuchAlgorithmException;
|
||||
throws PGPException, IOException;
|
||||
|
||||
/**
|
||||
* Revoke the key ring.
|
||||
|
|
|
|||
|
|
@ -88,12 +88,12 @@ public class KeyRingReader {
|
|||
}
|
||||
|
||||
public PGPPublicKeyRingCollection publicKeyRingCollection(@Nonnull InputStream inputStream)
|
||||
throws IOException, PGPException {
|
||||
throws IOException {
|
||||
return readPublicKeyRingCollection(inputStream);
|
||||
}
|
||||
|
||||
public PGPPublicKeyRingCollection publicKeyRingCollection(@Nonnull byte[] bytes)
|
||||
throws IOException, PGPException {
|
||||
throws IOException {
|
||||
return publicKeyRingCollection(new ByteArrayInputStream(bytes));
|
||||
}
|
||||
|
||||
|
|
@ -118,17 +118,17 @@ public class KeyRingReader {
|
|||
}
|
||||
|
||||
public PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull InputStream inputStream)
|
||||
throws IOException, PGPException {
|
||||
throws IOException {
|
||||
return readSecretKeyRingCollection(inputStream);
|
||||
}
|
||||
|
||||
public PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull byte[] bytes)
|
||||
throws IOException, PGPException {
|
||||
throws IOException {
|
||||
return secretKeyRingCollection(new ByteArrayInputStream(bytes));
|
||||
}
|
||||
|
||||
public PGPSecretKeyRingCollection secretKeyRingCollection(@Nonnull String asciiArmored)
|
||||
throws IOException, PGPException {
|
||||
throws IOException {
|
||||
return secretKeyRingCollection(asciiArmored.getBytes(UTF8));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ public final class SignatureUtils {
|
|||
* @throws IOException in case of a stream error
|
||||
* @throws PGPException in case of an OpenPGP error
|
||||
*/
|
||||
public static List<PGPSignature> readSignatures(InputStream inputStream, int maxIterations) throws IOException, PGPException {
|
||||
public static List<PGPSignature> readSignatures(InputStream inputStream, int maxIterations) throws IOException {
|
||||
List<PGPSignature> signatures = new ArrayList<>();
|
||||
InputStream pgpIn = ArmorUtils.getDecoderStream(inputStream);
|
||||
PGPObjectFactory objectFactory = ImplementationFactory.getInstance().getPGPObjectFactory(pgpIn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue