public static Archiver createArchiver(String archiveFormat) throws IllegalArgumentException {
        if (!ArchiveFormat.isValidArchiveFormat(archiveFormat)) {
            throw new IllegalArgumentException("Unknown archive format " + archiveFormat);
        }

        return createArchiver(ArchiveFormat.fromString(archiveFormat));
    }
public static Archiver createArchiver ( String archiveFormat ) throws IllegalArgumentException { if ( ! ArchiveFormat . isValidArchiveFormat ( archiveFormat ) ) { throw new IllegalArgumentException ( "Unknown archive format " + archiveFormat ) ; } return createArchiver ( ArchiveFormat . fromString ( archiveFormat ) ) ; }
Creates an Archiver for the given archive format.

@param archiveFormat the archive format e.g. "tar" or "zip"
@return a new Archiver instance
@throws IllegalArgumentException if the archive format is unknown