public class PemOutputStream extends Base64OutputStream
-----BEGIN RSA PRIVATE KEY----- Base64 encoded data -----END RSA PRIVATE KEY-----All lines will be terminated by '\n'.
| Constructor and Description |
|---|
PemOutputStream(java.io.OutputStream out,
java.lang.String firstLine,
java.lang.String lastLine)
Creates a new PemOutputStream to write PEM encoded data to
the specified underlying output stream.
|
PemOutputStream(java.io.OutputStream out,
java.lang.String firstLine,
java.lang.String lastLine,
byte[] lineBreak)
Creates a new PemOutputStream to write PEM encoded data to
the specified underlying output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flushes the stream and writes the last line.
|
getInstanceLineBreak, getLineBreak, setLineBreak, write, writepublic PemOutputStream(java.io.OutputStream out,
java.lang.String firstLine,
java.lang.String lastLine)
throws java.io.IOException
out - a stream of DER encoded datafirstLine - the first line in the stream to writelastLine - the last line in the stream to writejava.io.IOException - if occurs an I/O error while writing the first linepublic PemOutputStream(java.io.OutputStream out,
java.lang.String firstLine,
java.lang.String lastLine,
byte[] lineBreak)
throws java.io.IOException
out - a stream of DER encoded datafirstLine - the first line in the stream to writelastLine - the last line in the stream to writelineBreak - - the lineBreak the line break delimiter to be used; if null,
the currently static set line break delimiter
CRLF (0x0D, 0x0A) will be usedjava.io.IOException - if occurs an I/O error while writing the first linepublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class Base64OutputStreamjava.io.IOException - if there occurs an I/O error