public class ArmoredOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
static String |
VERSION_HDR |
Constructor and Description |
---|
ArmoredOutputStream(OutputStream out)
Constructs an armored output stream with
default headers . |
ArmoredOutputStream(OutputStream out,
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 (if one is present)
|
void |
setHeader(String name,
String value)
Set an additional header entry.
|
void |
write(int b) |
write, write
public static final String VERSION_HDR
public ArmoredOutputStream(OutputStream out)
default headers
.out
- the OutputStream to wrap.public ArmoredOutputStream(OutputStream out, Hashtable headers)
out
- the OutputStream to wrap.headers
- additional headers that add to or override the default
headers
.public void setHeader(String name, 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 IOException
hashAlgorithm
- IOException
public void endClearText()
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2017 BouncyCastle.org. All rights reserved.