|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--org.bouncycastle.bcpg.ArmoredOutputStream
Output stream that writes data in ASCII Armored format.
Note 1: close() needs to be called on an ArmoredOutputStream to write the final checksum. flush() will not do this as other classes assume it is always fine to call flush() - it is not though if the checksum gets output. Note 2: as multiple PGP blobs are often written to the same stream, close() does not close the underlying stream.
Inner Class Summary | |
static class |
ArmoredOutputStream.Builder
|
Field Summary | |
static java.lang.String |
CHARSET_HDR
|
static java.lang.String |
COMMENT_HDR
|
static java.lang.String |
DEFAULT_VERSION
|
static java.lang.String |
HASH_HDR
|
static java.lang.String |
MESSAGE_ID_HDR
|
static java.lang.String |
VERSION_HDR
|
Constructor Summary | |
ArmoredOutputStream(java.io.OutputStream out)
Constructs an armored output stream with default headers . |
|
ArmoredOutputStream(java.io.OutputStream out,
java.util.Hashtable headers)
Constructs an armored output stream with default and custom headers. |
Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
Deprecated. use appropriate methods in ArmoredOutputStream.Builder instead |
void |
beginClearText(int hashAlgorithm)
Start a clear text signed message - backwards compatibility. |
void |
beginClearText(int[] hashAlgorithms)
Start a clear text signed message. |
static ArmoredOutputStream.Builder |
builder()
|
void |
clearHeaders()
Deprecated. use appropriate methods in ArmoredOutputStream.Builder instead. |
void |
close()
Note: close() does not close the underlying stream. |
void |
endClearText()
|
void |
flush()
|
void |
resetHeaders()
Deprecated. use ArmoredOutputStream.Builder.clearHeaders() instead. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Deprecated. use appropriate methods in ArmoredOutputStream.Builder instead. |
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String VERSION_HDR
public static final java.lang.String COMMENT_HDR
public static final java.lang.String MESSAGE_ID_HDR
public static final java.lang.String HASH_HDR
public static final java.lang.String CHARSET_HDR
public static final java.lang.String DEFAULT_VERSION
Constructor Detail |
public ArmoredOutputStream(java.io.OutputStream out)
default headers
.out
- the OutputStream to wrap.public ArmoredOutputStream(java.io.OutputStream out, java.util.Hashtable headers)
out
- the OutputStream to wrap.headers
- additional headers that add to or override the default
headers
.Method Detail |
public void setHeader(java.lang.String name, java.lang.String value)
ArmoredOutputStream.Builder
instead.
name
- the name of the header entry.value
- the value of the header entry.public void clearHeaders()
ArmoredOutputStream.Builder
instead.
public void addHeader(java.lang.String name, java.lang.String value)
ArmoredOutputStream.Builder
instead
name
- the name of the header entry.value
- the value of the header entry.public void resetHeaders()
ArmoredOutputStream.Builder.clearHeaders()
instead.
public void beginClearText(int hashAlgorithm) throws java.io.IOException
hashAlgorithm
- hash algorithmpublic void beginClearText(int[] hashAlgorithms) throws java.io.IOException
hashAlgorithms
- hash algorithmspublic void endClearText()
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
public void flush() throws java.io.IOException
flush
in class java.io.OutputStream
public void close() throws java.io.IOException
close
in class java.io.OutputStream
public static ArmoredOutputStream.Builder builder()
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |