code: public Extractor newExtractor(Path archive, Path destination, ProgressListener progressListener)
        throws UnknownArchiveTypeException {
  
      if (archive.toString().toLowerCase().endsWith(".tar.gz")) {
        return new Extractor(archive, destination, new TarGzExtractorProvider(), progressListener);
      }
      if (archive.toString().toLowerCase().endsWith(".zip")) {
        return new Extractor(archive, destination, new ZipExtractorProvider(), progressListener);
      }
      throw new UnknownArchiveTypeException(archive);
    }
docs: Creates a new extractor based on filetype. Filetype determination is based on the filename
  string, this method makes no attempt to validate the file contents to verify they are the type
  defined by the file extension.
  
  @param archive the archive to extract
  @param destination the destination folder for extracted files
  @param progressListener a listener for progress
  @return {@link Extractor} with {@link TarGzExtractorProvider} for ".tar.gz", {@link
  ZipExtractorProvider} for ".zip"
  @throws UnknownArchiveTypeException if not ".tar.gz" or ".zip"