Interface ArchiveSource


public interface ArchiveSource
Provides access to an archive within an archive.
Since:
5.13
  • Method Details

    • extractToDisk

      void extractToDisk(@Nonnull Path target, @Nonnull Predicate<String> filter) throws IOException
      Filter and extract this contents of this archive to the specified target.
      Parameters:
      target - path on disk where files will be extracted
      filter - predicate applied to each file before extraction. If the predicate returns false the file will not be extracted
      Throws:
      IOException - if an error was encountered while performing IO
    • extractToDisk

      default void extractToDisk(@Nonnull Path target) throws IOException
      Extract this contents of this archive to the specified target.
      Parameters:
      target - path on disk where files will be extracted
      Throws:
      IOException - if an error was encountered while performing IO
    • getPath

      @Nonnull Path getPath()
      Get the path of this archive source.
      Returns:
      the path of this archive source
    • read

      default void read(@Nonnull IoConsumer<EntrySource> reader) throws IOException
      Filter and read each file in the archive.
      Parameters:
      reader - used to read the contents of each file
      Throws:
      IOException - if an error was encountered while performing IO
    • read

      void read(@Nonnull IoConsumer<EntrySource> reader, @Nonnull Predicate<String> filter) throws IOException
      Filter and read each file in the archive.
      Parameters:
      reader - used to read the contents of each file
      filter - predicate applied to each file before reading. If the predicate returns false the file will not be extracted
      Throws:
      IOException - if an error was encountered while performing IO