Class CommonsCompressArchiveExtractorBase

    • Constructor Detail

      • CommonsCompressArchiveExtractorBase

        public CommonsCompressArchiveExtractorBase()
    • Method Detail

      • createReader

        protected abstract org.apache.commons.compress.archivers.ArchiveInputStream createReader​(@NotNull
                                                                                                 File archive,
                                                                                                 @NotNull
                                                                                                 InputStream archiveStream)
                                                                                          throws org.apache.commons.compress.archivers.ArchiveException,
                                                                                                 IOException
        Throws:
        org.apache.commons.compress.archivers.ArchiveException
        IOException
      • postProcessEntry

        protected void postProcessEntry​(@NotNull
                                        org.apache.commons.compress.archivers.ArchiveEntry entry,
                                        @NotNull
                                        File file,
                                        @Nullable
                                        File root)
      • getEntitiesSize

        public Map<String,​Long> getEntitiesSize​(@NotNull
                                                      File archive)
                                               throws IOException
        Specified by:
        getEntitiesSize in interface ArchiveExtractor
        Parameters:
        archive - archive to be processed
        Returns:
        map of entities name to uncompressed size on this entry, same names which are used in ArchiveFileSelector will be used as keys, -1 as size may be returned if size is unknown
        Throws:
        IOException - Error occurred during extraction
      • extractFiles

        public void extractFiles​(@NotNull
                                 File archive,
                                 @NotNull
                                 ArchiveFileSelector selector)
                          throws IOException
        Description copied from interface: ArchiveExtractor
        Extracts files from given archive filtered by file selector
        Specified by:
        extractFiles in interface ArchiveExtractor
        Parameters:
        archive - archive to be processed
        selector - selector for files within the archive
        Throws:
        IOException - Error occurred during extraction