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 .