ucar.nc2.iosp.bufr
Class MessageScanner
java.lang.Object
ucar.nc2.iosp.bufr.MessageScanner
public class MessageScanner
- extends java.lang.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 java.io.IOException
- Throws:
java.io.IOException
MessageScanner
public MessageScanner(RandomAccessFile raf,
long startPos)
throws java.io.IOException
- Throws:
java.io.IOException
isValidFile
public static boolean isValidFile(RandomAccessFile raf)
throws java.io.IOException
- is this a valid BUFR file.
- Parameters:
raf - check this file
- Returns:
- true if its a BUFR file
- Throws:
java.io.IOException - on read error
hasNext
public boolean hasNext()
throws java.io.IOException
- Throws:
java.io.IOException
next
public Message next()
throws java.io.IOException
- Throws:
java.io.IOException
getMessageBytesFromLast
public byte[] getMessageBytesFromLast(Message m)
throws java.io.IOException
- Throws:
java.io.IOException
getMessageBytes
public byte[] getMessageBytes(Message m)
throws java.io.IOException
- Throws:
java.io.IOException
getTotalObs
public int getTotalObs()
getTotalMessages
public int getTotalMessages()
writeCurrentMessage
public long writeCurrentMessage(java.nio.channels.WritableByteChannel out)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.