Enum Class CompressionUtils.Format

java.lang.Object
java.lang.Enum<CompressionUtils.Format>
org.apache.druid.utils.CompressionUtils.Format
All Implemented Interfaces:
Serializable, Comparable<CompressionUtils.Format>, Constable
Enclosing class:
CompressionUtils

public static enum CompressionUtils.Format extends Enum<CompressionUtils.Format>
  • Enum Constant Details

  • Method Details

    • values

      public static CompressionUtils.Format[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CompressionUtils.Format valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSuffix

      public String getSuffix()
    • getExtension

      public String getExtension()
    • fromString

      @Nullable public static CompressionUtils.Format fromString(@Nullable String name)
    • fromFileName

      @Nullable public static CompressionUtils.Format fromFileName(@Nullable String fileName)
    • compressDirectory

      public long compressDirectory(File directory, OutputStream out) throws IOException
      Compresses a directory to the output stream. Default implementation throws UnsupportedOperationException. Override this method for formats that support directory compression.
      Parameters:
      directory - The directory to compress
      out - The output stream to write compressed data to
      Returns:
      The number of bytes (uncompressed) read from the input directory
      Throws:
      IOException - if an I/O error occurs
      UnsupportedOperationException - if the format doesn't support directory compression
    • decompressDirectory

      public FileUtils.FileCopyResult decompressDirectory(InputStream in, File outDir) throws IOException
      Decompresses a directory from the input stream. Default implementation throws UnsupportedOperationException. Override this method for formats that support directory decompression.
      Parameters:
      in - The input stream containing compressed data
      outDir - The output directory to extract files to
      Returns:
      A FileCopyResult containing information about extracted files
      Throws:
      IOException - if an I/O error occurs
      UnsupportedOperationException - if the format doesn't support directory decompression