grib/src/main/java/ucar/nc2/grib/collection/GribCdmIndex.java
public static GribCollectionImmutable openGribCollectionFromRaf(RandomAccessFile raf, FeatureCollectionConfig config,
                CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException {

    GribCollectionImmutable result;

    // check if its a plain ole GRIB1/2 data file
    boolean isGrib1 = false;
    boolean isGrib2 = Grib2RecordScanner.isValidFile(raf);
    if (!isGrib2) isGrib1 = Grib1RecordScanner.isValidFile(raf);

    if (isGrib1 || isGrib2) {
      result = openGribCollectionFromDataFile(isGrib1, raf, config, updateType, null, logger);
      // close the data file, the ncx raf file is managed by gribCollection
      raf.close();

    } else  {  // check its an ncx file
      result = openGribCollectionFromIndexFile(raf, config, logger);
    }

    return result;
  }
public static GribCollectionImmutable openGribCollectionFromRaf(RandomAccessFile raf, FeatureCollectionConfig config,
                CollectionUpdateType updateType, org.slf4j.Logger logger) throws IOException {

    GribCollectionImmutable result;

    // check if its a plain ole GRIB1/2 data file
    boolean isGrib1 = false;
    boolean isGrib2 = Grib2RecordScanner.isValidFile(raf);
    if (!isGrib2) isGrib1 = Grib1RecordScanner.isValidFile(raf);

    if (isGrib1 || isGrib2) {
      result = openGribCollectionFromDataFile(isGrib1, raf, config, updateType, null, logger);
      // close the data file, the ncx raf file is managed by gribCollection
      raf.close();

    } else  {  // check its an ncx file
      result = openGribCollectionFromIndexFile(raf, config, logger);
    }

    return result;
  }
public static GribCollectionImmutable openGribCollectionFromRaf ( RandomAccessFile raf , FeatureCollectionConfig config , CollectionUpdateType updateType , org . slf4j . Logger logger ) throws IOException { GribCollectionImmutable result ; // check if its a plain ole GRIB1/2 data file boolean isGrib1 = false ; boolean isGrib2 = Grib2RecordScanner . isValidFile ( raf ) ; if ( ! isGrib2 ) isGrib1 = Grib1RecordScanner . isValidFile ( raf ) ; if ( isGrib1 || isGrib2 ) { result = openGribCollectionFromDataFile ( isGrib1 , raf , config , updateType , null , logger ) ; // close the data file, the ncx raf file is managed by gribCollection raf . close ( ) ; } else { // check its an ncx file result = openGribCollectionFromIndexFile ( raf , config , logger ) ; } return result ; }
Used by IOSPs
Used by IOSPs