类 BufrDataInfo


  • public class BufrDataInfo
    extends Object
    作者:
    Yaqiang Wang
    • 字段详细资料

      • BIT_MASK

        protected static int[] BIT_MASK
    • 构造器详细资料

      • BufrDataInfo

        public BufrDataInfo()
    • 方法详细资料

      • build

        public static ucar.nc2.NetcdfFile build​(ucar.nc2.iosp.IOServiceProvider spi,
                                                String location)
                                         throws IOException
        抛出:
        IOException
      • readMessages

        public List<ucar.nc2.iosp.bufr.Message> readMessages​(String fileName)
                                                      throws IOException
        Read Messages
        参数:
        fileName - Bufr file name
        返回:
        Messages
        抛出:
        IOException
      • createDataFile

        public void createDataFile​(String fileName)
        Create Bufr binary data file
        参数:
        fileName - File name
      • closeDataFile

        public void closeDataFile()
        Close the data file created by previous step
      • writeIndicatorSection

        public int writeIndicatorSection​(int bufrLength,
                                         int edition)
                                  throws IOException
        Write indicator section
        参数:
        bufrLength - The total length of the message
        edition - Bufr edition
        返回:
        Indicator section length
        抛出:
        IOException
      • reWriteIndicatorSection

        public void reWriteIndicatorSection​(int bufrLength,
                                            int edition)
                                     throws IOException
        Write indicator section
        参数:
        bufrLength - The total length of the message
        edition - Bufr edition
        抛出:
        IOException
      • writeIdentificationSection

        public int writeIdentificationSection​(int len,
                                              int master_table,
                                              int subcenter_id,
                                              int center_id,
                                              int update_sequence,
                                              int optional,
                                              int category,
                                              int sub_category,
                                              int master_table_version,
                                              int local_table_version,
                                              int year,
                                              int month,
                                              int day,
                                              int hour,
                                              int minute)
                                       throws IOException
        Write identification section
        参数:
        len - Section length
        master_table - Master table
        subcenter_id - Sub center id
        center_id - Center id
        update_sequence - Update sequence
        optional - Optional
        category - Category
        sub_category - Sub category
        master_table_version - Master table version
        local_table_version - Local table version
        year - Year
        month - Month
        day - Day
        hour - Hour
        minute - Minute
        返回:
        Section length
        抛出:
        IOException
      • writeDataDescriptionSection

        public int writeDataDescriptionSection​(int ndatasets,
                                               int datatype,
                                               List<String> descriptors)
                                        throws IOException
        Write data description section
        参数:
        ndatasets - Number of datasets
        datatype - Data type
        descriptors - Data descriptors
        返回:
        Section length
        抛出:
        IOException
      • writeDataSectionHead

        public int writeDataSectionHead​(int len)
                                 throws IOException
        Write data section head
        参数:
        len - Length
        返回:
        Data section head length
        抛出:
        IOException
      • reWriteDataSectionHead

        public void reWriteDataSectionHead​(int len)
                                    throws IOException
        Write data section head
        参数:
        len - Length
        抛出:
        IOException
      • write

        public int write​(int value,
                         int nbits)
                  throws IOException
        Write a int value
        参数:
        value - Value
        nbits - bit number
        返回:
        Data length
        抛出:
        IOException
      • write

        public int write​(String des,
                         int value)
                  throws IOException
        Write a int value
        参数:
        value - Value
        des - Data descriptor string
        返回:
        Data length
        抛出:
        IOException
      • toByteArray

        public byte[] toByteArray​(BitSet bs)
      • setBit

        protected static void setBit​(int bit,
                                     byte[] bytes)
      • writeEndSection

        public int writeEndSection()
                            throws IOException
        Write end section
        返回:
        End section length
        抛出:
        IOException