Class TarCompressor

All Implemented Interfaces:
com.imyeyu.utils.OS.FileSystem

public class TarCompressor extends Compressor<TarCompressor>
Tar 压缩器
Version:
2024-06-30 19:48
Author:
夜雨
  • Constructor Details

    • TarCompressor

      public TarCompressor()
  • Method Details

    • from

      public static TarCompressor from(String fromPath)
      创建压缩器
      Parameters:
      fromPath - 源路径
      Returns:
      压缩器
    • from

      public static TarCompressor from(File fromFile)
      创建压缩器
      Parameters:
      fromFile - 源文件
      Returns:
      压缩器
    • toStream

      protected void toStream(String fromPath, OutputStream toStream) throws Exception
      Description copied from class: Compressor
      执行压缩到输出流
      Specified by:
      toStream in class Compressor<TarCompressor>
      Parameters:
      fromPath - 源路径
      toStream - 目标输出流
      Throws:
      Exception - 压缩失败