public class ArmoredOutputStream
extends java.io.OutputStream
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
beginClearText(int hashAlgorithm)
Start a clear text signed message.
|
void |
close()
Note: close() does not 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) |
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.public void setHeader(java.lang.String name,
java.lang.String value)
name - the name of the header entry.value - the value of the header entry.public void resetHeaders()
public void beginClearText(int hashAlgorithm)
throws java.io.IOException
hashAlgorithm - java.io.IOExceptionpublic void endClearText()
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException