Package ucar.nc2.grib.grib2
Class Grib2SectionProductDefinition
- java.lang.Object
-
- ucar.nc2.grib.grib2.Grib2SectionProductDefinition
-
@Immutable public class Grib2SectionProductDefinition extends Object
The Product Definition section 4 for GRIB-2 files- Since:
- 3/28/11
-
-
Constructor Summary
Constructors Constructor Description Grib2SectionProductDefinition(byte[] rawData)
Set PDS section from byte array.Grib2SectionProductDefinition(RandomAccessFile raf)
Read Product Definition section from raf.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
calcCRC()
Calculate the CRC of the entire byte arrayint
getLength()
Grib2Pds
getPDS()
Parse the raw bytes into a Grib2Pdsint
getPDSTemplateNumber()
Get PDS Template Number (code table 4.0)byte[]
getRawBytes()
get the raw bytes of the PDS
-
-
-
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 errorIllegalArgumentException
- 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
-
-