mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
Add documentation to ArmoredOutputStreamFactory
This commit is contained in:
parent
fd867bbfbe
commit
66293bf333
1 changed files with 7 additions and 0 deletions
|
@ -21,6 +21,7 @@ import org.bouncycastle.bcpg.ArmoredOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory to create configured {@link ArmoredOutputStream ArmoredOutputStreams}.
|
* Factory to create configured {@link ArmoredOutputStream ArmoredOutputStreams}.
|
||||||
|
* The configuration entails setting custom version and comment headers.
|
||||||
*/
|
*/
|
||||||
public class ArmoredOutputStreamFactory {
|
public class ArmoredOutputStreamFactory {
|
||||||
|
|
||||||
|
@ -28,6 +29,12 @@ public class ArmoredOutputStreamFactory {
|
||||||
private static String VERSION = PGPAINLESS;
|
private static String VERSION = PGPAINLESS;
|
||||||
public static String[] COMMENT = new String[0];
|
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) {
|
public static ArmoredOutputStream get(OutputStream outputStream) {
|
||||||
ArmoredOutputStream armoredOutputStream = new ArmoredOutputStream(outputStream);
|
ArmoredOutputStream armoredOutputStream = new ArmoredOutputStream(outputStream);
|
||||||
armoredOutputStream.setHeader(ArmorUtils.HEADER_VERSION, VERSION);
|
armoredOutputStream.setHeader(ArmorUtils.HEADER_VERSION, VERSION);
|
||||||
|
|
Loading…
Reference in a new issue