public class BufrDataInfo extends Object
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected static int[] |
BIT_MASK |
| 构造器 | 说明 |
|---|---|
BufrDataInfo() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
closeDataFile() |
Close the data file created by previos step
|
void |
createDataFile(String fileName) |
Create Bufr binary data file
|
ucar.nc2.iosp.bufr.Message |
readFirstMessage(String fileName) |
Read first message
|
void |
reWriteDataSectionHead(int len) |
Write data section head
|
void |
reWriteIndicatorSection(int bufrLength,
int edition) |
Write indicator section
|
protected static void |
setBit(int bit,
byte[] bytes) |
|
byte[] |
toByteArray(BitSet bs) |
|
int |
write(int value,
int nbits) |
Write a int value
|
int |
write(String des,
int value) |
Write a int value
|
int |
write(List<Integer> values,
List<Integer> nbits) |
Write int values
|
int |
writeDataDescriptionSection(int ndatasets,
int datatype,
List<String> descriptors) |
Write data description section
|
int |
writeDataSectionHead(int len) |
Write data section head
|
int |
writeEndSection() |
Write end section
|
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) |
Write identification section
|
int |
writeIndicatorSection(int bufrLength,
int edition) |
Write indicator section
|
public ucar.nc2.iosp.bufr.Message readFirstMessage(String fileName) throws FileNotFoundException, IOException
fileName - Bufr File NameFileNotFoundExceptionIOExceptionpublic void createDataFile(String fileName)
fileName - File namepublic void closeDataFile()
public int writeIndicatorSection(int bufrLength,
int edition)
throws IOException
bufrLength - The total length of the messageedition - Bufr editionIOExceptionpublic void reWriteIndicatorSection(int bufrLength,
int edition)
throws IOException
bufrLength - The total length of the messageedition - Bufr editionIOExceptionpublic 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
len - Section lengthmaster_table - Master tablesubcenter_id - Subcenter idcenter_id - Center idupdate_sequence - Update sequencyoptional - Optionalcategory - Categorysub_category - Sub categorymaster_table_version - Master table versionlocal_table_version - Local table versionyear - Yearmonth - Monthday - Dayhour - Hourminute - MinuteIOExceptionpublic int writeDataDescriptionSection(int ndatasets,
int datatype,
List<String> descriptors)
throws IOException
ndatasets - Number of datasetsdatatype - Data typedescriptors - Data descriptorsIOExceptionpublic int writeDataSectionHead(int len)
throws IOException
len - LengthIOExceptionpublic void reWriteDataSectionHead(int len)
throws IOException
len - LengthIOExceptionpublic int write(int value,
int nbits)
throws IOException
value - Valuenbits - bit numberIOExceptionpublic int write(String des, int value) throws IOException
value - Valuedes - Data descriptor stringIOExceptionpublic int write(List<Integer> values, List<Integer> nbits) throws IOException
values - Valuesnbits - bit numbersIOExceptionpublic byte[] toByteArray(BitSet bs)
protected static void setBit(int bit,
byte[] bytes)
public int writeEndSection()
throws IOException
IOExceptionCopyright © 2019. All rights reserved.