public void showInfo(Formatter f) {
    if (dcm == null) {
      if (spec == null) return;
      dcm = scanCollection(spec, f);
      if (dcm == null) return;
    }

    // just a list of the files
    f.format("dcm = %s%n", dcm);
    try {
      for (MFile mfile : dcm.getFilesSorted()) {
        f.format("  %s%n", mfile.getPath());
      }
    } catch (IOException e) {
      e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
    }

    // show nrecords, data size
    int nrecords = 0;
    long dataSize = 0;
    long msgSize = 0;
    for (Object o : param2BeanTable.getBeans()) {
      Grib2ParameterBean p = (Grib2ParameterBean) o;
      for (Grib2RecordBean r : p.getRecordBeans()) {
        nrecords++;
        dataSize += r.getDataLength();
        msgSize += r.getMsgLength();
      }
    }
    f.format("nrecords = %d, total grib data size = %d, total grib msg sizes = %d", nrecords, dataSize, msgSize);
  }
public void showInfo ( Formatter f ) { if ( dcm == null ) { if ( spec == null ) return ; dcm = scanCollection ( spec , f ) ; if ( dcm == null ) return ; } f . format ( "dcm = %s%n" , dcm ) ; try { for ( MFile mfile : dcm . getFilesSorted ( ) ) { f . format ( "  %s%n" , mfile . getPath ( ) ) ; } } catch ( IOException e ) { e . printStackTrace ( ) ; } int nrecords = 0 ; long dataSize = 0 ; long msgSize = 0 ; for ( Object o : param2BeanTable . getBeans ( ) ) { Grib2ParameterBean p = ( Grib2ParameterBean ) o ; for ( Grib2RecordBean r : p . getRecordBeans ( ) ) { nrecords ++ ; dataSize += r . getDataLength ( ) ; msgSize += r . getMsgLength ( ) ; } } f . format ( "nrecords = %d, total grib data size = %d, total grib msg sizes = %d" , nrecords , dataSize , msgSize ) ; }
/* public boolean writeIndex(Formatter f) throws IOException {
MCollection dcm = scanCollection(spec, f);

if (fileChooser == null)
fileChooser = new FileManager(null, null, null, (PreferencesExt) prefs.node("FileManager"));
String name = dcm.getCollectionName();
int pos = name.lastIndexOf('/');
if (pos < 0) pos = name.lastIndexOf('\\');
if (pos > 0) name = name.substring(pos + 1);
File def = new File(dcm.getRoot(), name + GribCollection.NCX_IDX);
String filename = fileChooser.chooseFilename(def);
if (filename == null) return false;
if (!filename.endsWith(GribCollection.NCX_IDX))
filename += GribCollection.NCX_IDX;
File idxFile = new File(filename);

Grib2CollectionBuilder.makeIndex(dcm, new Formatter(), logger);
return true;
}