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.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int[] | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv CRC24 | |
| private static final byte[] | |
| pack-priv String | |
| pack-priv String | |
| pack-priv Hashtable | |
| pack-priv String | |
| pack-priv String | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv String | |
| pack-priv OutputStream | |
| pack-priv boolean | |
| pack-priv String | |
| pack-priv String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | ArmoredOutputStream(OutputStream
the OutputStream to wrap. out)Constructs an armored output stream with |
| public | ArmoredOutputStream(OutputStream
the OutputStream to wrap. out, Hashtable<String, String> additional headers that add to or override the headers)default
headers.Constructs an armored output stream with default and custom headers. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | |
| public void | close()
Overrides java. Implements java. Note close() does not close the underlying stream. |
| private void | encode(OutputStream out, int[] data, int len)
encode the input data producing a base 64 encoded byte array. |
| public void | |
| public void | flush()
Overrides java. Implements java. |
| public void | |
| public void | |
| public void | write(int
the b)byte.Implements abstract java. |
| private void |
| buf | back to summary |
|---|---|
| pack-priv int[] buf | |
| bufPtr | back to summary |
|---|---|
| pack-priv int bufPtr | |
| chunkCount | back to summary |
|---|---|
| pack-priv int chunkCount | |
| clearText | back to summary |
|---|---|
| pack-priv boolean clearText | |
| crc | back to summary |
|---|---|
| pack-priv CRC24 crc | |
| encodingTable | back to summary |
|---|---|
| private static final byte[] encodingTable | |
| footerStart | back to summary |
|---|---|
| pack-priv String footerStart | |
| footerTail | back to summary |
|---|---|
| pack-priv String footerTail | |
| headers | back to summary |
|---|---|
| pack-priv Hashtable<String, List<String>> headers | |
| headerStart | back to summary |
|---|---|
| pack-priv String headerStart | |
| headerTail | back to summary |
|---|---|
| pack-priv String headerTail | |
| lastb | back to summary |
|---|---|
| pack-priv int lastb | |
| newLine | back to summary |
|---|---|
| pack-priv boolean newLine | |
| nl | back to summary |
|---|---|
| pack-priv String nl | |
| out | back to summary |
|---|---|
| pack-priv OutputStream out | |
| start | back to summary |
|---|---|
| pack-priv boolean start | |
| type | back to summary |
|---|---|
| pack-priv String type | |
| version | back to summary |
|---|---|
| pack-priv String version | |
| VERSION_HDR | back to summary |
|---|---|
| public static final String VERSION_HDR | |
| ArmoredOutputStream | back to summary |
|---|---|
| public ArmoredOutputStream(OutputStream out) Constructs an armored output stream with
| |
| ArmoredOutputStream | back to summary |
|---|---|
| public ArmoredOutputStream(OutputStream out, Hashtable<String, String> headers) Constructs an armored output stream with default and custom headers.
| |
| addHeader | back to summary |
|---|---|
| public void addHeader(String name, String value) Set an additional header entry. The current value(s) will continue to exist together with the new one. Adding a null value has no effect. | |
| beginClearText | back to summary |
|---|---|
| public void beginClearText(int... hashAlgorithms) throws IOException Start a clear text signed message.
| |
| clearHeaders | back to summary |
|---|---|
| public void clearHeaders() Remove all headers. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Note close() does not close the underlying stream. So it is possible to write multiple objects using armoring to a single stream.
| |
| encode | back to summary |
|---|---|
| private void encode(OutputStream out, int[] data, int len) throws IOException encode the input data producing a base 64 encoded byte array. | |
| endClearText | back to summary |
|---|---|
| public void endClearText() | |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| resetHeaders | back to summary |
|---|---|
| public void resetHeaders() Reset the headers to only contain a Version string (if one is present) | |
| setHeader | back to summary |
|---|---|
| public void setHeader(String name, String value) Set an additional header entry. Any current value(s) under the same name will be replaced by the new one. A null value will clear the entry for name. | |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| writeHeaderEntry | back to summary |
|---|---|
| private void writeHeaderEntry(String name, String value) throws IOException | |