Class AesGcmOutputFile

java.lang.Object
org.apache.iceberg.encryption.AesGcmOutputFile
All Implemented Interfaces:
OutputFile

public class AesGcmOutputFile extends Object implements OutputFile
  • Constructor Details

    • AesGcmOutputFile

      public AesGcmOutputFile(OutputFile targetFile, byte[] dataKey, byte[] fileAADPrefix)
  • Method Details

    • create

      public PositionOutputStream create()
      Description copied from interface: OutputFile
      Create a new file and return a PositionOutputStream to it.

      If the file already exists, this will throw an exception.

      Specified by:
      create in interface OutputFile
      Returns:
      an output stream that can report its position
    • createOrOverwrite

      public PositionOutputStream createOrOverwrite()
      Description copied from interface: OutputFile
      Create a new file and return a PositionOutputStream to it.

      If the file already exists, this will not throw an exception and will replace the file.

      Specified by:
      createOrOverwrite in interface OutputFile
      Returns:
      an output stream that can report its position
    • location

      public String location()
      Description copied from interface: OutputFile
      Return the location this output file will create.
      Specified by:
      location in interface OutputFile
      Returns:
      the location of this output file
    • toInputFile

      public InputFile toInputFile()
      Description copied from interface: OutputFile
      Return an InputFile for the location of this output file.
      Specified by:
      toInputFile in interface OutputFile
      Returns:
      an input file for the location of this output file