code: public static Archiver createArchiver(File archive) throws IllegalArgumentException {
          FileType fileType = FileType.get(archive);
  
          if (fileType == FileType.UNKNOWN) {
              throw new IllegalArgumentException("Unknown file extension " + archive.getName());
          }
  
          return createArchiver(fileType);
      }
docs: Probes the given {@link File} for its file type and creates an {@link Archiver} based on this file type. If the
  File has a composite file extension such as ".tar.gz", the created {@link Archiver} will also handle ".gz"
  compression.
  
  @param archive the archive file to check.
  @return a new Archiver instance (that may also handle compression)
  @throws IllegalArgumentException if the given file is not a known archive