public class CertificateWriter extends Object
CertificateWriter is a utility class for write certificates in files or streams
in several file formats.| Constructor and Description |
|---|
CertificateWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
write(X509Certificate certificate,
File file,
KeyFileFormat fileFormat)
|
static void |
write(X509Certificate certificate,
OutputStream outputStream,
KeyFileFormat fileFormat)
|
static void |
writeInDerFormat(X509Certificate certificate,
File file)
Write the given
X509Certificate into the given File in the *.der format. |
static void |
writeInDerFormat(X509Certificate certificate,
OutputStream outputStream)
Write the given
X509Certificate into the given OutputStream in the *.pem
format. |
static void |
writeInPemFormat(X509Certificate certificate,
File file)
Write the given
X509Certificate into the given File in the *.pem format. |
static void |
writeInPemFormat(X509Certificate certificate,
OutputStream outputStream)
Write the given
X509Certificate into the given OutputStream in the *.pem
format. |
public static void write(X509Certificate certificate, @NonNull File file, KeyFileFormat fileFormat) throws IOException, CertificateEncodingException
certificate - the certificatefile - the file to write infileFormat - the file format to writeIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.public static void write(X509Certificate certificate, @NonNull OutputStream outputStream, KeyFileFormat fileFormat) throws IOException, CertificateEncodingException
certificate - the certificateoutputStream - the output streamfileFormat - the file format to writeIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.public static void writeInDerFormat(X509Certificate certificate, @NonNull File file) throws IOException, CertificateEncodingException
X509Certificate into the given File in the *.der format.certificate - the certificatefile - the file to write inIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.public static void writeInDerFormat(X509Certificate certificate, @NonNull OutputStream outputStream) throws IOException, CertificateEncodingException
X509Certificate into the given OutputStream in the *.pem
format.certificate - the certificateoutputStream - the output stream to write inIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.public static void writeInPemFormat(X509Certificate certificate, @NonNull File file) throws IOException, CertificateEncodingException
X509Certificate into the given File in the *.pem format.certificate - the certificatefile - the file to write inIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.public static void writeInPemFormat(X509Certificate certificate, @NonNull OutputStream outputStream) throws IOException, CertificateEncodingException
X509Certificate into the given OutputStream in the *.pem
format.certificate - the certificateoutputStream - the output stream to write inIOException - Signals that an I/O exception has occurred.CertificateEncodingException - is thrown if an encoding error occurs.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.