bufr/src/main/java/ucar/nc2/iosp/bufr/writer/BufrSplitter2.java
public void execute(String filename) throws IOException {
      try (RandomAccessFile mraf = new RandomAccessFile(filename, "r")) {
        MessageScanner scanner = new MessageScanner(mraf);

        while (scanner.hasNext()) {
          Message m = scanner.next();
          if (m == null) continue;
          total_msgs++;
          if (m.getNumberDatasets() == 0) continue;

          // LOOK check on tables complete etc ??

          m.setRawBytes(scanner.getMessageBytes(m));

          // decide what to do with the message
          dispatcher.dispatch(m);
        }

        dispatcher.resetBufrTableMessages();
      }
    }
public void execute(String filename) throws IOException {
      try (RandomAccessFile mraf = new RandomAccessFile(filename, "r")) {
        MessageScanner scanner = new MessageScanner(mraf);

        while (scanner.hasNext()) {
          Message m = scanner.next();
          if (m == null) continue;
          total_msgs++;
          if (m.getNumberDatasets() == 0) continue;

          // LOOK check on tables complete etc ??

          m.setRawBytes(scanner.getMessageBytes(m));

          // decide what to do with the message
          dispatcher.dispatch(m);
        }

        dispatcher.resetBufrTableMessages();
      }
    }
public void execute ( String filename ) throws IOException { try ( RandomAccessFile mraf = new RandomAccessFile ( filename , "r" ) ) { MessageScanner scanner = new MessageScanner ( mraf ) ; while ( scanner . hasNext ( ) ) { Message m = scanner . next ( ) ; if ( m == null ) continue ; total_msgs ++ ; if ( m . getNumberDatasets ( ) == 0 ) continue ; // LOOK check on tables complete etc ?? m . setRawBytes ( scanner . getMessageBytes ( m ) ) ; // decide what to do with the message dispatcher . dispatch ( m ) ; } dispatcher . resetBufrTableMessages ( ) ; } }
LOOK - needs to be a directory, or maybe an MFILE collection
LOOK - needs to be a directory or maybe an MFILE collection