ucar.nc2.iosp.bufr
Class MessageScanner
java.lang.Object
ucar.nc2.iosp.bufr.MessageScanner
public class MessageScanner
- extends Object
Sequentially scans a BUFR file, extracts the messages.
- Since:
- May 9, 2008
- Author:
- caron
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_MESSAGE_SIZE
public static final int MAX_MESSAGE_SIZE
- See Also:
- Constant Field Values
MessageScanner
public MessageScanner(RandomAccessFile raf)
throws IOException
- Throws:
IOException
MessageScanner
public MessageScanner(RandomAccessFile raf,
long startPos)
throws IOException
- Throws:
IOException
isValidFile
public static boolean isValidFile(RandomAccessFile raf)
throws IOException
- is this a valid BUFR file.
- Parameters:
raf
- check this file
- Returns:
- true if its a BUFR file
- Throws:
IOException
- on read error
hasNext
public boolean hasNext()
throws IOException
- Throws:
IOException
next
public Message next()
throws IOException
- Throws:
IOException
getMessageBytesFromLast
public byte[] getMessageBytesFromLast(Message m)
throws IOException
- Throws:
IOException
getMessageBytes
public byte[] getMessageBytes(Message m)
throws IOException
- Throws:
IOException
getTotalObs
public int getTotalObs()
getTotalMessages
public int getTotalMessages()
writeCurrentMessage
public long writeCurrentMessage(WritableByteChannel out)
throws IOException
- Throws:
IOException
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.