public final class BinaryKeysetWriter extends Object implements KeysetWriter
KeysetWriter that can write to some source cleartext or encrypted keysets in proto binary wire format.| Modifier and Type | Method and Description |
|---|---|
static KeysetWriter |
withFile(File file)
Deprecated.
|
static KeysetWriter |
withOutputStream(OutputStream stream)
Static method to create a BinaryKeysetWriter that writes to an
OutputStream. |
void |
write(EncryptedKeyset keyset)
Tries to write an
EncryptedKeyset to some storage system. |
void |
write(Keyset keyset)
Tries to write a
Keyset to some storage system. |
public static KeysetWriter withOutputStream(OutputStream stream)
OutputStream.
stream will be immmediately closed after the keyset is written.
@InlineMe(replacement="BinaryKeysetWriter.withOutputStream(new FileOutputStream(file))",
imports={"com.google.crypto.tink.BinaryKeysetWriter","java.io.FileOutputStream"})
@Deprecated
public static KeysetWriter withFile(File file)
throws IOException
IOExceptionpublic void write(Keyset keyset) throws IOException
KeysetWriterKeyset to some storage system.write in interface KeysetWriterIOExceptionpublic void write(EncryptedKeyset keyset) throws IOException
KeysetWriterEncryptedKeyset to some storage system.write in interface KeysetWriterIOException