Package org.gudy.bouncycastle.openssl
Class PEMWriter
java.lang.Object
java.io.Writer
java.io.BufferedWriter
org.gudy.bouncycastle.openssl.PEMWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
General purpose writer for OpenSSL PEM objects.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
writeEncoded
(byte[] bytes) private void
writeFooter
(String type) private void
writeHeader
(String type) private void
writeHexEncoded
(byte[] bytes) void
void
writeObject
(Object obj, String algorithm, char[] password, SecureRandom random)
-
Field Details
-
provider
-
-
Constructor Details
-
PEMWriter
Base constructor.- Parameters:
out
- output stream to use.
-
PEMWriter
-
-
Method Details
-
writeHexEncoded
- Throws:
IOException
-
writeEncoded
- Throws:
IOException
-
writeObject
- Throws:
IOException
-
writeObject
public void writeObject(Object obj, String algorithm, char[] password, SecureRandom random) throws IOException - Throws:
IOException
-
writeHeader
- Throws:
IOException
-