Class BinaryKeysetWriter

    • 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.
      Inline the function.
      static KeysetWriter withOutputStream​(java.io.OutputStream stream)
      Static method to create a BinaryKeysetWriter that writes to an OutputStream.
      void write​(com.google.crypto.tink.proto.EncryptedKeyset keyset)
      Tries to write an EncryptedKeyset to some storage system.
      void write​(com.google.crypto.tink.proto.Keyset keyset)
      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)
        Static method to create a BinaryKeysetWriter that writes to an OutputStream.

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