public class MessageScanner
extends java.lang.Object
Constructor and Description |
---|
MessageScanner(RandomAccessFile raf) |
MessageScanner(RandomAccessFile raf,
long startPos,
boolean useEmbeddedTables) |
Modifier and Type | Method and Description |
---|---|
Message |
getFirstDataMessage() |
byte[] |
getMessageBytes(Message m) |
byte[] |
getMessageBytesFromLast(Message m) |
TableLookup |
getTableLookup() |
int |
getTotalMessages() |
int |
getTotalObs() |
boolean |
hasNext() |
static boolean |
isValidFile(RandomAccessFile raf)
is this a valid BUFR file.
|
Message |
next() |
void |
reset() |
long |
writeCurrentMessage(java.nio.channels.WritableByteChannel out) |
public MessageScanner(RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public MessageScanner(RandomAccessFile raf, long startPos, boolean useEmbeddedTables) throws java.io.IOException
java.io.IOException
public static boolean isValidFile(RandomAccessFile raf) throws java.io.IOException
raf
- check this filejava.io.IOException
- on read errorpublic Message getFirstDataMessage() throws java.io.IOException
java.io.IOException
public void reset()
public boolean hasNext() throws java.io.IOException
java.io.IOException
public Message next()
public TableLookup getTableLookup() throws java.io.IOException
java.io.IOException
public byte[] getMessageBytesFromLast(Message m) throws java.io.IOException
java.io.IOException
public byte[] getMessageBytes(Message m) throws java.io.IOException
java.io.IOException
public int getTotalObs()
public int getTotalMessages()
public long writeCurrentMessage(java.nio.channels.WritableByteChannel out) throws java.io.IOException
java.io.IOException