From 66293bf333225a8947621ac8723cf8cff06674b8 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sun, 15 Aug 2021 13:41:07 +0200 Subject: [PATCH] Add documentation to ArmoredOutputStreamFactory --- .../org/pgpainless/util/ArmoredOutputStreamFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/util/ArmoredOutputStreamFactory.java b/pgpainless-core/src/main/java/org/pgpainless/util/ArmoredOutputStreamFactory.java index 39b95196..22e68431 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/util/ArmoredOutputStreamFactory.java +++ b/pgpainless-core/src/main/java/org/pgpainless/util/ArmoredOutputStreamFactory.java @@ -21,6 +21,7 @@ import org.bouncycastle.bcpg.ArmoredOutputStream; /** * Factory to create configured {@link ArmoredOutputStream ArmoredOutputStreams}. + * The configuration entails setting custom version and comment headers. */ public class ArmoredOutputStreamFactory { @@ -28,6 +29,12 @@ public class ArmoredOutputStreamFactory { private static String VERSION = PGPAINLESS; public static String[] COMMENT = new String[0]; + /** + * Wrap an {@link OutputStream} inside a preconfigured {@link ArmoredOutputStream}. + * + * @param outputStream inner stream + * @return armored output stream + */ public static ArmoredOutputStream get(OutputStream outputStream) { ArmoredOutputStream armoredOutputStream = new ArmoredOutputStream(outputStream); armoredOutputStream.setHeader(ArmorUtils.HEADER_VERSION, VERSION);