Package org.bouncycastle.bcpg
Class ArmoredOutputStream.Builder
java.lang.Object
org.bouncycastle.bcpg.ArmoredOutputStream.Builder
- Enclosing class:
ArmoredOutputStream
-
Method Summary
Modifier and TypeMethodDescriptionaddComment
(String comment) Add the given value as one or more additionalbuild
(OutputStream outputStream) enableCRC
(boolean doComputeCRC) Enable calculation and inclusion of the CRC check sum (default is true).setCharset
(String charset) Replace thesetComment
(String comment) Replace thesetMessageId
(String messageId) Replace thesetVersion
(String version) Set a
-
Method Details
-
build
-
setVersion
Set aVersion:
header. Note: Adding version headers to ASCII armored output is discouraged to minimize metadata.- Parameters:
version
- version- Returns:
- builder
-
setComment
Replace theComment:
header field with the given comment. If the comment contains newlines, multiple headers will be added, one for each newline. If the comment isnull
, then the output will contain no comments.- Parameters:
comment
- comment- Returns:
- builder
-
setMessageId
Replace theMessageID:
header field with the given messageId.- Parameters:
messageId
- message ID- Returns:
- builder
-
setCharset
Replace theCharset:
header with the given value.- Parameters:
charset
- charset- Returns:
- builder
-
addComment
Add the given value as one or more additionalComment:
headers to the already present comments. If the comment contains newlines, multiple headers will be added, one for each newline. If the comment isnull
, this method does nothing.- Parameters:
comment
- comment- Returns:
- builder
-
clearHeaders
-
enableCRC
Enable calculation and inclusion of the CRC check sum (default is true).- Parameters:
doComputeCRC
- true if CRC to be included, false otherwise.- Returns:
- the current builder instance.
-