code: public static final boolean isArchive(InputStream in) throws IOException {
          if (in != null) {
              try (ZipInputStream zip = new ZipInputStream(in)){
                  return zip.getNextEntry() != null;
              } catch (ZipException e) {
                  return false;
              }
          }
          return false;
      }
docs: Test if the target path is an archive.
  @param in stream that reads the target path
  @return true if the path points to a zip file - false otherwise.
  @throws IOException