public static boolean isArchive(Path path) {
        String archivePath = path.toString().toLowerCase(Locale.ROOT);
        return archivePath.endsWith(".jar") || archivePath.endsWith(".zip");
    }
Return whether a path corresponds to a JAR or ZIP archive.

@param path the path to validate.
@return true if the path is a JAR or ZIP archive file, otherwise false.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/PluginUtils.java