Class JsonKeysetWriter

  • All Implemented Interfaces:
    KeysetWriter

    @Deprecated
    public final class JsonKeysetWriter
    extends java.lang.Object
    implements KeysetWriter
    Deprecated.
    Serialize the Keyset using TinkJsonProtoKeysetFormat.serializeKeyset() instead.
    A KeysetWriter that 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 KeysetWriter withFile​(java.io.File file)
      Deprecated.
      Method should be inlined.
      static KeysetWriter withOutputStream​(java.io.OutputStream stream)
      Deprecated.
      Static method to create a JsonKeysetWriter that writes to an OutputStream.
      static KeysetWriter withPath​(java.lang.String path)
      Deprecated.
      Method should be inlined.
      static KeysetWriter withPath​(java.nio.file.Path path)
      Deprecated.
      Method should be inlined.
      void write​(com.google.crypto.tink.proto.EncryptedKeyset keyset)
      Deprecated.
      Tries to write an EncryptedKeyset to some storage system.
      void write​(com.google.crypto.tink.proto.Keyset keyset)
      Deprecated.
      Tries to write a Keyset to some storage system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withOutputStream

        public static KeysetWriter withOutputStream​(java.io.OutputStream stream)
        Deprecated.
        Static method to create a JsonKeysetWriter that writes to an OutputStream.

        stream will 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.IOException
        Deprecated.
        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.IOException
        Deprecated.
        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.IOException
        Deprecated.
        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.IOException
        Deprecated.
        Description copied from interface: KeysetWriter
        Tries to write a Keyset to some storage system.
        Specified by:
        write in interface KeysetWriter
        Throws:
        java.io.IOException
      • write

        public void write​(com.google.crypto.tink.proto.EncryptedKeyset keyset)
                   throws java.io.IOException
        Deprecated.
        Description copied from interface: KeysetWriter
        Tries to write an EncryptedKeyset to some storage system.
        Specified by:
        write in interface KeysetWriter
        Throws:
        java.io.IOException