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

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(String name, String value)
Set an additional header entry.
void
write(int b)

Constructor Details

ArmoredOutputStream

public ArmoredOutputStream(OutputStream out)

ArmoredOutputStream

public ArmoredOutputStream(OutputStream out,
                           Hashtable headers)

Method Details

beginClearText

public void beginClearText(int hashAlgorithm)
            throws IOException
Start a clear text signed message.
Parameters:
hashAlgorithm -

close

public void close()
            throws IOException
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()
            throws IOException

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)
            throws IOException