ucar.grib.grib1
Class Grib1Input

java.lang.Object
  extended by ucar.grib.grib1.Grib1Input

public final class Grib1Input
extends java.lang.Object

A class that scans a GRIB file to extract product information.


Constructor Summary
Grib1Input(ucar.unidata.io.RandomAccessFile raf)
          Constructs a Grib1Input object from a raf.
 
Method Summary
 int getEdition()
          Grib edition number 1, 2 or 0 not a Grib file.
 java.util.HashMap<java.lang.String,Grib1GridDefinitionSection> getGDSs()
          Get GDS's of the GRIB file.
 java.util.ArrayList<Grib1Product> getProducts()
          Get products of the GRIB file.
 java.util.ArrayList<Grib1Record> getRecords()
          Get records of the GRIB file.
 void scan(boolean getProducts, boolean oneRecord)
          scans a Grib file to gather information that could be used to create an index or dump the metadata contents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib1Input

public Grib1Input(ucar.unidata.io.RandomAccessFile raf)
Constructs a Grib1Input object from a raf.

Parameters:
raf - with GRIB content
Method Detail

scan

public final void scan(boolean getProducts,
                       boolean oneRecord)
                throws NotSupportedException,
                       NoValidGribException,
                       java.io.IOException
scans a Grib file to gather information that could be used to create an index or dump the metadata contents.

Parameters:
getProducts - products have enough information for data extractions
oneRecord - returns after processing one record in the Grib file
Throws:
NoValidGribException - not supported grib feature
NotSupportedException - not supported grib feature
java.io.IOException - if raf does not contain a valid GRIB record

getEdition

public final int getEdition()
                     throws java.io.IOException
Grib edition number 1, 2 or 0 not a Grib file.

Returns:
int 0 not a Grib file, 1 Grib1, 2 Grib2
Throws:
java.io.IOException - raf read

getProducts

public final java.util.ArrayList<Grib1Product> getProducts()
Get products of the GRIB file.

Returns:
products

getRecords

public final java.util.ArrayList<Grib1Record> getRecords()
Get records of the GRIB file.

Returns:
records

getGDSs

public final java.util.HashMap<java.lang.String,Grib1GridDefinitionSection> getGDSs()
Get GDS's of the GRIB file.

Returns:
gdsHM