From 70cca563d7dd0ab87e61c0a7b0f41bf83e5bc220 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 16 Nov 2022 17:24:26 +0100 Subject: [PATCH] Add javadoc to getMetadata() and getResult() --- .../decryption_verification/DecryptionStream.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStream.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStream.java index e3a51bb9..c967ba10 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStream.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStream.java @@ -8,8 +8,21 @@ import java.io.InputStream; public abstract class DecryptionStream extends InputStream { + /** + * Return {@link MessageMetadata metadata} about the decrypted / verified message. + * The {@link DecryptionStream} MUST be closed via {@link #close()} before the metadata object can be accessed. + * + * @return message metadata + */ public abstract MessageMetadata getMetadata(); + /** + * Return a {@link OpenPgpMetadata} object containing information about the decrypted / verified message. + * The {@link DecryptionStream} MUST be closed via {@link #close()} before the metadata object can be accessed. + * + * @return message metadata + * @deprecated use {@link #getMetadata()} instead. + */ @Deprecated public OpenPgpMetadata getResult() { return getMetadata().toLegacyMetadata();