public class Message
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
BufrDataSection |
dataSection |
BufrDataDescriptionSection |
dds |
BufrIdentificationSection |
ids |
BufrIndicatorSection |
is |
Constructor and Description |
---|
Message(RandomAccessFile raf,
BufrIndicatorSection is,
BufrIdentificationSection ids,
BufrDataDescriptionSection dds,
BufrDataSection dataSection) |
Modifier and Type | Method and Description |
---|---|
int |
calcTotalBits(java.util.Formatter out) |
void |
close() |
boolean |
containsBufrTable()
Check if this message contains a BUFR table
|
void |
dump(java.util.Formatter out) |
void |
dumpHeader(java.util.Formatter out) |
void |
dumpHeaderShort(java.util.Formatter out) |
boolean |
equals(java.lang.Object obj)
BufrMessage is equal if they have the same dds.
|
java.lang.String |
extractWMO() |
BitCounterUncompressed |
getBitCounterUncompressed(int obsOffsetInMessage)
Get the offset of this obs from the start of the message data.
|
int |
getCountedDataBits() |
int |
getCountedDataBytes() |
int |
getDDShashcode() |
java.lang.String |
getHeader() |
BufrTableLookup |
getLookup() |
long |
getMessageSize()
Get the byte length of the entire BUFR record.
|
int |
getNumberDatasets()
Get number of datasets in this message.
|
byte[] |
getRawBytes() |
CalendarDate |
getReferenceTime() |
DataDescriptor |
getRootDataDescriptor()
Get the root of the DataDescriptor tree.
|
long |
getStartPos() |
int |
getTotalBits()
This is the total number of bits taken by the data in the data section of the message.
|
int |
hashCode()
Override hashcode to be consistent with equals.
|
boolean |
isBitCountOk() |
boolean |
isTablesComplete()
Check if all descriptors were found in the tables.
|
void |
setHeader(java.lang.String header) |
void |
setRawBytes(byte[] raw) |
void |
setStartPos(long startPos) |
void |
showMissingFields(java.util.Formatter out) |
boolean |
usesLocalTable() |
public BufrIndicatorSection is
public BufrIdentificationSection ids
public BufrDataDescriptionSection dds
public BufrDataSection dataSection
public Message(RandomAccessFile raf, BufrIndicatorSection is, BufrIdentificationSection ids, BufrDataDescriptionSection dds, BufrDataSection dataSection) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public int getNumberDatasets()
public CalendarDate getReferenceTime()
public void setHeader(java.lang.String header)
public java.lang.String getHeader()
public void setStartPos(long startPos)
public long getStartPos()
public void setRawBytes(byte[] raw)
public byte[] getRawBytes()
public java.lang.String extractWMO()
public long getMessageSize()
public DataDescriptor getRootDataDescriptor()
public boolean usesLocalTable() throws java.io.IOException
java.io.IOException
public boolean containsBufrTable() throws java.io.IOException
java.io.IOException
- on read errorpublic boolean isTablesComplete() throws java.io.IOException
java.io.IOException
- on read errorpublic BufrTableLookup getLookup()
public boolean isBitCountOk() throws java.io.IOException
java.io.IOException
public int getCountedDataBytes()
public int getCountedDataBits()
public BitCounterUncompressed getBitCounterUncompressed(int obsOffsetInMessage)
obsOffsetInMessage
- index of obs in the messagepublic int getTotalBits()
public int calcTotalBits(java.util.Formatter out)
public int hashCode()
hashCode
in class java.lang.Object
public int getDDShashcode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- other BufrMessagepublic void showMissingFields(java.util.Formatter out) throws java.io.IOException
java.io.IOException
public void dump(java.util.Formatter out)
public void dumpHeader(java.util.Formatter out)
public void dumpHeaderShort(java.util.Formatter out)