ucar.bufr
Class BufrInput

java.lang.Object
  extended by ucar.bufr.BufrInput

public final class BufrInput
extends java.lang.Object

A class that scans a BUFR file to extract product information. Also it is used to check if this is a valid BUFR file and count the total number of obs in the file.


Constructor Summary
BufrInput(ucar.unidata.io.RandomAccessFile raf)
          Constructs a BufrInput object from a raf.
 
Method Summary
 java.util.ArrayList getRecords()
          Get records of the BUFR file.
 int getTotalObs()
          Get total number of observations in the BUFR file.
 boolean isValidFile()
          is this a valid Bufr file.
 void scan(boolean oneRecord, boolean getData)
          scans a Bufr file to gather metadata and data.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufrInput

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

Parameters:
raf - with BUFR content
Method Detail

scan

public final void scan(boolean oneRecord,
                       boolean getData)
                throws java.io.IOException
scans a Bufr file to gather metadata and data.

Parameters:
oneRecord - returns after processing one record in the Bufr file.
getData - decodes the data.
Throws:
java.io.IOException - if raf does not contain a valid BUFR record

isValidFile

public final boolean isValidFile()
                          throws java.io.IOException
is this a valid Bufr file.

Returns:
valid.
Throws:
java.io.IOException

getRecords

public final java.util.ArrayList getRecords()
Get records of the BUFR file. Usually a BUFR file is a concatenation of small BUFR files and a smaller file is called a record.

Returns:
products

getTotalObs

public final int getTotalObs()
Get total number of observations in the BUFR file.

Returns:
numberObs