Package com.google.crypto.tink
Class BinaryKeysetWriter
- java.lang.Object
-
- com.google.crypto.tink.BinaryKeysetWriter
-
- All Implemented Interfaces:
KeysetWriter
public final class BinaryKeysetWriter extends java.lang.Object implements KeysetWriter
AKeysetWriterthat can write to some source cleartext or encrypted keysets in proto binary wire format.- Since:
- 1.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static KeysetWriterwithFile(java.io.File file)Deprecated.Inline the function.static KeysetWriterwithOutputStream(java.io.OutputStream stream)Static method to create a BinaryKeysetWriter that writes to anOutputStream.voidwrite(com.google.crypto.tink.proto.EncryptedKeyset keyset)Tries to write anEncryptedKeysetto some storage system.voidwrite(com.google.crypto.tink.proto.Keyset keyset)Tries to write aKeysetto some storage system.
-
-
-
Method Detail
-
withOutputStream
public static KeysetWriter withOutputStream(java.io.OutputStream stream)
Static method to create a BinaryKeysetWriter that writes to anOutputStream.streamwill be immmediately closed after the keyset is written.
-
withFile
@InlineMe(replacement="BinaryKeysetWriter.withOutputStream(new FileOutputStream(file))", imports={"com.google.crypto.tink.BinaryKeysetWriter","java.io.FileOutputStream"}) @Deprecated public static KeysetWriter withFile(java.io.File file) throws java.io.IOExceptionDeprecated.Inline the function.Static method to create a BinaryKeysetWriter that writes to a file.- Throws:
java.io.IOException
-
write
public void write(com.google.crypto.tink.proto.Keyset keyset) throws java.io.IOExceptionDescription copied from interface:KeysetWriterTries to write aKeysetto some storage system.- Specified by:
writein interfaceKeysetWriter- Throws:
java.io.IOException
-
write
public void write(com.google.crypto.tink.proto.EncryptedKeyset keyset) throws java.io.IOExceptionDescription copied from interface:KeysetWriterTries to write anEncryptedKeysetto some storage system.- Specified by:
writein interfaceKeysetWriter- Throws:
java.io.IOException
-
-