コード例 #1
0
ファイル: DatasetViewer.java プロジェクト: mazl123321/thredds
 void writeNetCDF(String filename) {
   try {
     FileWriter2 writer = new FileWriter2(ds, filename, NetcdfFileWriter.Version.netcdf3);
     NetcdfFile result = writer.write();
     result.close();
     JOptionPane.showMessageDialog(this, "File successfully written");
   } catch (Exception ioe) {
     JOptionPane.showMessageDialog(this, "ERROR: " + ioe.getMessage());
     ioe.printStackTrace();
   }
 }
コード例 #2
0
ファイル: DatasetViewer.java プロジェクト: mazl123321/thredds
 void writeNcstreamHeader(String filename) {
   try {
     NcStreamWriter writer = new NcStreamWriter(ds, null);
     FileOutputStream fos = new FileOutputStream(filename);
     writer.sendHeader(fos);
     fos.close();
     JOptionPane.showMessageDialog(this, "File successfully written");
   } catch (Exception ioe) {
     JOptionPane.showMessageDialog(this, "ERROR: " + ioe.getMessage());
     ioe.printStackTrace();
   }
 }