ui/src/main/java/ucar/nc2/ui/op/DatasetViewer.java
void writeNetcdf(NetcdfOutputChooser.Data data) {
    if (data.version == NetcdfFileWriter.Version.ncstream) {
      writeNcstream(data.outputFilename);
      return;
    }

    try {
      FileWriter2 writer = new FileWriter2(ds, data.outputFilename, data.version,
              Nc4ChunkingStrategy.factory(data.chunkerType, data.deflate, data.shuffle));
      NetcdfFile result = writer.write();
      result.close();
      JOptionPane.showMessageDialog(this, "File successfully written");
    } catch (Exception ioe) {
      JOptionPane.showMessageDialog(this, "ERROR: " + ioe.getMessage());
      ioe.printStackTrace();
    }
  }
void writeNetcdf(NetcdfOutputChooser.Data data) {
    if (data.version == NetcdfFileWriter.Version.ncstream) {
      writeNcstream(data.outputFilename);
      return;
    }

    try {
      FileWriter2 writer = new FileWriter2(ds, data.outputFilename, data.version,
              Nc4ChunkingStrategy.factory(data.chunkerType, data.deflate, data.shuffle));
      NetcdfFile result = writer.write();
      result.close();
      JOptionPane.showMessageDialog(this, "File successfully written");
    } catch (Exception ioe) {
      JOptionPane.showMessageDialog(this, "ERROR: " + ioe.getMessage());
      ioe.printStackTrace();
    }
  }
void writeNetcdf ( NetcdfOutputChooser . Data data ) { if ( data . version == NetcdfFileWriter . Version . ncstream ) { writeNcstream ( data . outputFilename ) ; return ; } try { FileWriter2 writer = new FileWriter2 ( ds , data . outputFilename , data . version , Nc4ChunkingStrategy . factory ( data . chunkerType , data . deflate , data . shuffle ) ) ; NetcdfFile result = writer . write ( ) ; result . close ( ) ; JOptionPane . showMessageDialog ( this , "File successfully written" ) ; } catch ( Exception ioe ) { JOptionPane . showMessageDialog ( this , "ERROR: " + ioe . getMessage ( ) ) ; ioe . printStackTrace ( ) ; } }
/////////////////////////////////////
/////////////////////////////////////