ucar.grib.grib1
Class Grib1Input

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

public final class Grib1Input
extends Object

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


Constructor Summary
Grib1Input(RandomAccessFile raf)
          Constructs a Grib1Input object from a raf.
 
Method Summary
 int getEdition()
          Grib edition number 1, 2 or 0 not a Grib file.
 HashMap<String,Grib1GridDefinitionSection> getGDSs()
          Get GDS's of the GRIB file.
 ArrayList<Grib1Product> getProducts()
          Get products of the GRIB file.
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib1Input

public Grib1Input(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 NoValidGribException,
                       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
IOException - if raf does not contain a valid GRIB record

getEdition

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

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

getProducts

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

Returns:
products

getRecords

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

Returns:
records

getGDSs

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

Returns:
gdsHM


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.