ucar.nc2.iosp.bufr
Class BufrIdentificationSection

java.lang.Object
  extended by ucar.nc2.iosp.bufr.BufrIdentificationSection

public class BufrIdentificationSection
extends Object

A class representing the IdentificationSection (section 1) of a BUFR record. Handles editions 2,3,4.

Author:
Robb Kambic, caron

Constructor Summary
BufrIdentificationSection(RandomAccessFile raf, BufrIndicatorSection is)
          Constructs a BufrIdentificationSection object from a raf.
 
Method Summary
 int getCategory()
           
 int getCenterId()
          Identification of center.
 int getLocalSubCategory()
           
 int getLocalTableVersion()
           
 byte[] getLocalUseBytes()
          last bytes of the id section are "reserved for local use by ADP centers.
 int getMasterTableId()
           
 int getMasterTableVersion()
           
 byte[] getOptionalSection(RandomAccessFile raf)
           
 Date getReferenceTime(GregorianCalendar cal)
          return record header time as a Date
 int getSubCategory()
           
 int getSubCenterId()
          Identification of subcenter.
 int getUpdateSequence()
          Get update sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufrIdentificationSection

public BufrIdentificationSection(RandomAccessFile raf,
                                 BufrIndicatorSection is)
                          throws IOException
Constructs a BufrIdentificationSection object from a raf.

Parameters:
raf - RandomAccessFile with Section 1 content
is - the BufrIndicatorSection, needed for the bufr edition number
Throws:
IOException - if raf contains no valid BUFR file
Method Detail

getCenterId

public final int getCenterId()
Identification of center.

Returns:
center id as int

getSubCenterId

public final int getSubCenterId()
Identification of subcenter.

Returns:
subcenter as int

getUpdateSequence

public final int getUpdateSequence()
Get update sequence.

Returns:
update_sequence

getReferenceTime

public final Date getReferenceTime(GregorianCalendar cal)
return record header time as a Date

Parameters:
cal - use this calendar to construct the date
Returns:
referenceTime

getCategory

public final int getCategory()

getSubCategory

public final int getSubCategory()

getLocalSubCategory

public final int getLocalSubCategory()

getMasterTableId

public final int getMasterTableId()

getMasterTableVersion

public final int getMasterTableVersion()

getLocalTableVersion

public final int getLocalTableVersion()

getLocalUseBytes

public final byte[] getLocalUseBytes()
last bytes of the id section are "reserved for local use by ADP centers.

Returns:
local use bytes, if any.

getOptionalSection

public final byte[] getOptionalSection(RandomAccessFile raf)
                                throws IOException
Throws:
IOException


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