org.bouncycastle.bcpg

Class ArmoredOutputStream

public class ArmoredOutputStream extends OutputStream

Basic output stream.
Constructor Summary
ArmoredOutputStream(OutputStream out)
ArmoredOutputStream(OutputStream out, Hashtable headers)
Method Summary
voidbeginClearText(int hashAlgorithm)
Start a clear text signed message.
voidclose()
Note: close does nor close the underlying stream.
voidendClearText()
voidflush()
voidresetHeaders()
Reset the headers to only contain a Version string.
voidsetHeader(String name, String value)
Set an additional header entry.
voidwrite(int b)

Constructor Detail

ArmoredOutputStream

public ArmoredOutputStream(OutputStream out)

ArmoredOutputStream

public ArmoredOutputStream(OutputStream out, Hashtable headers)

Method Detail

beginClearText

public void beginClearText(int hashAlgorithm)
Start a clear text signed message.

Parameters: hashAlgorithm

close

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

endClearText

public void endClearText()

flush

public void flush()

resetHeaders

public void resetHeaders()
Reset the headers to only contain a Version string.

setHeader

public void setHeader(String name, String value)
Set an additional header entry.

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

write

public void write(int b)