Package com.google.crypto.tink
Class JsonKeysetWriter
- java.lang.Object
-
- com.google.crypto.tink.JsonKeysetWriter
-
- All Implemented Interfaces:
KeysetWriter
@Deprecated public final class JsonKeysetWriter extends java.lang.Object implements KeysetWriter
Deprecated.Serialize the Keyset usingTinkJsonProtoKeysetFormat.serializeKeyset()instead.AKeysetWriterthat can write to some source cleartext or encrypted keysets in proto JSON 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.Method should be inlined.static KeysetWriterwithOutputStream(java.io.OutputStream stream)Deprecated.Static method to create a JsonKeysetWriter that writes to anOutputStream.static KeysetWriterwithPath(java.lang.String path)Deprecated.Method should be inlined.static KeysetWriterwithPath(java.nio.file.Path path)Deprecated.Method should be inlined.voidwrite(com.google.crypto.tink.proto.EncryptedKeyset keyset)Deprecated.Tries to write anEncryptedKeysetto some storage system.voidwrite(com.google.crypto.tink.proto.Keyset keyset)Deprecated.Tries to write aKeysetto some storage system.
-
-
-
Method Detail
-
withOutputStream
public static KeysetWriter withOutputStream(java.io.OutputStream stream)
Deprecated.Static method to create a JsonKeysetWriter that writes to anOutputStream.streamwill be closed after the keyset is written.
-
withFile
@InlineMe(replacement="JsonKeysetWriter.withOutputStream(new FileOutputStream(file))", imports={"com.google.crypto.tink.JsonKeysetWriter","java.io.FileOutputStream"}) @Deprecated public static KeysetWriter withFile(java.io.File file) throws java.io.IOExceptionDeprecated.Method should be inlined.Static method to create a JsonKeysetWriter that writes to a file.- Throws:
java.io.IOException
-
withPath
@InlineMe(replacement="JsonKeysetWriter.withOutputStream(new FileOutputStream(new File(path)))", imports={"com.google.crypto.tink.JsonKeysetWriter","java.io.File","java.io.FileOutputStream"}) @Deprecated public static KeysetWriter withPath(java.lang.String path) throws java.io.IOExceptionDeprecated.Method should be inlined.Static method to create a JsonKeysetWriter that writes to a file path.- Throws:
java.io.IOException
-
withPath
@InlineMe(replacement="JsonKeysetWriter.withOutputStream(new FileOutputStream(path.toFile()))", imports={"com.google.crypto.tink.JsonKeysetWriter","java.io.FileOutputStream"}) @Deprecated public static KeysetWriter withPath(java.nio.file.Path path) throws java.io.IOExceptionDeprecated.Method should be inlined.Static method to create a JsonKeysetWriter that writes to a file path.This method only works on Android API level 26 or newer.
- Throws:
java.io.IOException
-
write
public void write(com.google.crypto.tink.proto.Keyset keyset) throws java.io.IOExceptionDeprecated.Description 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.IOExceptionDeprecated.Description copied from interface:KeysetWriterTries to write anEncryptedKeysetto some storage system.- Specified by:
writein interfaceKeysetWriter- Throws:
java.io.IOException
-
-