@ Override public boolean isValidFile ( RandomAccessFile raf ) throws IOException { if ( raf instanceof HTTPRandomAccessFile ) { // only do remote if memory resident if ( raf . length ( ) > raf . getBufferSize ( ) ) return false ; } else { // wont accept remote index GribCdmIndex . GribCollectionType type = GribCdmIndex . getType ( raf ) ; if ( type == GribCdmIndex . GribCollectionType . GRIB2 ) return true ; if ( type == GribCdmIndex . GribCollectionType . Partition2 ) return true ; } // check for GRIB2 data file return Grib2RecordScanner . isValidFile ( raf ) ; }
accept grib2 or ncx files