Class Grib2SectionProductDefinition


  • @Immutable
    public class Grib2SectionProductDefinition
    extends Object
    The Product Definition section 4 for GRIB-2 files
    Since:
    3/28/11
    • Constructor Detail

      • Grib2SectionProductDefinition

        public Grib2SectionProductDefinition​(RandomAccessFile raf)
                                      throws IOException
        Read Product Definition section from raf.
        Parameters:
        raf - RandomAccessFile, with pointer at start of section
        Throws:
        IOException - on I/O error
        IllegalArgumentException - if not a GRIB-2 record
      • Grib2SectionProductDefinition

        public Grib2SectionProductDefinition​(byte[] rawData)
        Set PDS section from byte array.
        Parameters:
        rawData - the byte array
    • Method Detail

      • getRawBytes

        public byte[] getRawBytes()
        get the raw bytes of the PDS
        Returns:
        PDS as byte[]
      • calcCRC

        public long calcCRC()
        Calculate the CRC of the entire byte array
        Returns:
        CRC
      • getLength

        public int getLength()
      • getPDSTemplateNumber

        public int getPDSTemplateNumber()
        Get PDS Template Number (code table 4.0)
        Returns:
        PDS Template Number
      • getPDS

        public Grib2Pds getPDS()
        Parse the raw bytes into a Grib2Pds
        Returns:
        Grib2Pds