接口 TarArchive

所有已知实现类:
ImageArchive, ZipFileTarArchive
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface TarArchive
A TAR archive that can be written to an output stream.
从以下版本开始:
4.0
作者:
Phillip Webb
  • 字段详细资料

    • NORMALIZED_TIME

      static final Instant NORMALIZED_TIME
      Instant that can be used to normalize TAR files so all entries have the same modification time.
  • 方法详细资料

    • writeTo

      void writeTo(OutputStream outputStream) throws IOException
      Write the TAR archive to the given output stream.
      参数:
      outputStream - the output stream to write to
      抛出:
      IOException - on IO error
    • of

      static TarArchive of(IOConsumer<Layout> layout)
      Factory method to create a new TarArchive instance with a specific layout.
      参数:
      layout - the TAR layout
      返回:
      a new TarArchive instance
    • fromZip

      static TarArchive fromZip(File zip, Owner owner)
      Factory method to adapt a ZIP file to TarArchive.
      参数:
      zip - the source zip file
      owner - the owner of the entries in the TAR
      返回:
      a new TarArchive instance