ucar.grib.grib2
Class Grib2Data

java.lang.Object
  extended by ucar.grib.grib2.Grib2Data

public final class Grib2Data
extends java.lang.Object

A class used to extract data from a Grib2 file. see IndexFormat.txt


Constructor Summary
Grib2Data(ucar.unidata.io.RandomAccessFile raf)
          Constructs a Grib2Data object for a RandomAccessFile.
 
Method Summary
 float[] getData(long GdsOffset, long PdsOffset)
          Reads the Grib data with a certain offsets in the file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grib2Data

public Grib2Data(ucar.unidata.io.RandomAccessFile raf)
Constructs a Grib2Data object for a RandomAccessFile.

Parameters:
raf - ucar.unidata.io.RandomAccessFile with GRIB content
Method Detail

getData

public final float[] getData(long GdsOffset,
                             long PdsOffset)
                      throws java.io.IOException
Reads the Grib data with a certain offsets in the file.

Parameters:
GdsOffset - position in record where GDS starts
PdsOffset - position in record where PDS starts
Returns:
float[] the data
Throws:
java.io.IOException - if raf does not contain a valid GRIB record.