public static class ArmoredOutputStream.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
ArmoredOutputStream.Builder |
addComment(java.lang.String comment)
Add the given value as one or more additional
|
ArmoredOutputStream |
build(java.io.OutputStream outputStream) |
ArmoredOutputStream.Builder |
clearHeaders() |
ArmoredOutputStream.Builder |
enableCRC(boolean doComputeCRC)
Enable calculation and inclusion of the CRC check sum (default is true).
|
ArmoredOutputStream.Builder |
setCharset(java.lang.String charset)
Replace the
|
ArmoredOutputStream.Builder |
setComment(java.lang.String comment)
Replace the
|
ArmoredOutputStream.Builder |
setMessageId(java.lang.String messageId)
Replace the
|
ArmoredOutputStream.Builder |
setVersion(java.lang.String version)
Set a
|
public ArmoredOutputStream build(java.io.OutputStream outputStream)
public ArmoredOutputStream.Builder setVersion(java.lang.String version)
Version:header. Note: Adding version headers to ASCII armored output is discouraged to minimize metadata.
version
- versionpublic ArmoredOutputStream.Builder setComment(java.lang.String comment)
Comment:header field with the given comment. If the comment contains newlines, multiple headers will be added, one for each newline. If the comment is
null, then the output will contain no comments.
comment
- commentpublic ArmoredOutputStream.Builder setMessageId(java.lang.String messageId)
MessageID:header field with the given messageId.
messageId
- message IDpublic ArmoredOutputStream.Builder setCharset(java.lang.String charset)
Charset:header with the given value.
charset
- charsetpublic ArmoredOutputStream.Builder addComment(java.lang.String comment)
Comment:headers to the already present comments. If the comment contains newlines, multiple headers will be added, one for each newline. If the comment is
null, this method does nothing.
comment
- commentpublic ArmoredOutputStream.Builder clearHeaders()
public ArmoredOutputStream.Builder enableCRC(boolean doComputeCRC)
doComputeCRC
- true if CRC to be included, false otherwise.