code: public static final boolean isArchive(Path path) throws IOException {
          if (Files.exists(path) && Files.isRegularFile(path)) {
              try (ZipFile zip = new ZipFile(path.toFile())){
                  return true;
              } catch (ZipException e) {
                  return false;
              }
          }
          return false;
      }
docs: Test if the target path is an archive.
  @param path path to the file.
  @return true if the path points to a zip file - false otherwise.
  @throws IOException