Package org.pgpainless.util
Class ArmoredOutputStreamFactory
- java.lang.Object
-
- org.pgpainless.util.ArmoredOutputStreamFactory
-
public final class ArmoredOutputStreamFactory extends Object
Factory to create configuredArmoredOutputStreams. The configuration entails setting custom version and comment headers.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPGPAINLESS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.bouncycastle.bcpg.ArmoredOutputStreamget(OutputStream outputStream)Wrap anOutputStreaminside a preconfiguredArmoredOutputStream.static voidresetComment()Reset to the default of no comment headers.static voidresetVersionInfo()Reset the version header to its default value ofPGPAINLESS.static voidsetComment(String commentString)Set a comment header value in the ASCII armor header.static voidsetVersionInfo(String versionString)Overwrite the version header of ASCII armors with a custom value.
-
-
-
Field Detail
-
PGPAINLESS
public static final String PGPAINLESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static org.bouncycastle.bcpg.ArmoredOutputStream get(OutputStream outputStream)
Wrap anOutputStreaminside a preconfiguredArmoredOutputStream.- Parameters:
outputStream- inner stream- Returns:
- armored output stream
-
setVersionInfo
public static void setVersionInfo(String versionString)
Overwrite the version header of ASCII armors with a custom value. Newlines in the version info string result in multiple version header entries.- Parameters:
versionString- version string
-
resetVersionInfo
public static void resetVersionInfo()
Reset the version header to its default value ofPGPAINLESS.
-
setComment
public static void setComment(String commentString)
Set a comment header value in the ASCII armor header. If the comment contains newlines, it will be split into multiple header entries.- Parameters:
commentString- comment
-
resetComment
public static void resetComment()
Reset to the default of no comment headers.
-
-