Bouncy Castle Cryptography Library 1.45

## org.bouncycastle.bcpg
Class ArmoredOutputStream

    java.lang.Object
      java.io.OutputStream
          org.bouncycastle.bcpg.ArmoredOutputStream

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable

    public class ArmoredOutputStream

extends java.io.OutputStream

Basic output stream.

Constructor Summary
`ArmoredOutputStream(java.io.OutputStream out)`
`ArmoredOutputStream(java.io.OutputStream out, java.util.Hashtable headers)`

Method Summary
`void` `beginClearText(int hashAlgorithm)` Start a clear text signed message.
`void` `close()` Note: close does nor close the underlying stream.
`void` `endClearText()`
`void` `flush()`
`void` `resetHeaders()` Reset the headers to only contain a Version string.
`void` `setHeader(java.lang.String name, java.lang.String value)` Set an additional header entry.
`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`

Constructor Detail

### ArmoredOutputStream

    public ArmoredOutputStream(java.io.OutputStream out)

### ArmoredOutputStream

    public ArmoredOutputStream(java.io.OutputStream out,
                               java.util.Hashtable headers)

Method Detail

### setHeader

    public void setHeader(java.lang.String name,
                          java.lang.String value)

  Set an additional header entry.

  Parameters:
    `name` - the name of the header entry.
    `value` - the value of the header entry.

### resetHeaders

    public void resetHeaders()

  Reset the headers to only contain a Version string.

### beginClearText

    public void beginClearText(int hashAlgorithm)
                        throws java.io.IOException

  Start a clear text signed message.

  Parameters:
    `hashAlgorithm` -
  Throws:
    `java.io.IOException`

### endClearText

    public void endClearText()

### write

    public void write(int b)
               throws java.io.IOException

  Specified by:
    `write` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException`

### flush

    public void flush()
               throws java.io.IOException

  Specified by:
    `flush` in interface `java.io.Flushable`
  Overrides:
    `flush` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Note: close does nor close the underlying stream. So it is possible to write multiple objects using armoring to a single stream.

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.OutputStream`
  Throws:
    `java.io.IOException`

Bouncy Castle Cryptography Library 1.45