public class PrivateKeyWriter extends Object
PrivateKeyWriter is a utility class for write public keys in files or streams.| Constructor and Description |
|---|
PrivateKeyWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
write(PrivateKey privateKey,
File file)
Write the given
PrivateKey into the given File in the *.der format. |
static void |
write(PrivateKey privateKey,
OutputStream outputStream)
Write the given
PrivateKey into the given OutputStream in the *.der format. |
static void |
write(PrivateKey privateKey,
OutputStream outputStream,
KeyFileFormat fileFormat,
KeyFormat keyFormat)
Write the given
PrivateKey into the given OutputStream in the given formats. |
static void |
writeInPemFormat(PrivateKey privateKey,
File file)
Write the given
PrivateKey into the given File. |
public static void write(PrivateKey privateKey, @NonNull File file) throws IOException
PrivateKey into the given File in the *.der format.privateKey - the private keyfile - the file to write inIOException - Signals that an I/O exception has occurred.public static void write(PrivateKey privateKey, @NonNull OutputStream outputStream) throws IOException
PrivateKey into the given OutputStream in the *.der format.privateKey - the private keyoutputStream - the output stream to write inIOException - Signals that an I/O exception has occurred.public static void writeInPemFormat(PrivateKey privateKey, @NonNull File file) throws IOException
PrivateKey into the given File.privateKey - the private keyfile - the file to write inIOException - Signals that an I/O exception has occurred.public static void write(PrivateKey privateKey, @NonNull OutputStream outputStream, KeyFileFormat fileFormat, KeyFormat keyFormat) throws IOException
PrivateKey into the given OutputStream in the given formats.privateKey - the private keyoutputStream - the output streamfileFormat - the file formatkeyFormat - the private key formatIOException - Signals that an I/O exception has occurred.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.