cdm/src/main/java/ucar/nc2/NetcdfFile.java
static public boolean canOpen(String location) throws IOException {
    ucar.unidata.io.RandomAccessFile raf = null;
    try {
      raf = getRaf(location, -1);
      return (raf != null) && canOpen(raf);
    } finally {
      if (raf != null) raf.close();
    }
  }
static public boolean canOpen(String location) throws IOException {
    ucar.unidata.io.RandomAccessFile raf = null;
    try {
      raf = getRaf(location, -1);
      return (raf != null) && canOpen(raf);
    } finally {
      if (raf != null) raf.close();
    }
  }
Find out if the file can be opened, but dont actually open it.
Experimental.

@param location same as open
@return true if can be opened
@throws IOException on read error