+ private static void CommandGraph(File file) {
+ MicroPeak m = new MicroPeak();
+ m.OpenFile(file);
+ }
+
+ private static void CommandExport(File file) {
+ try {
+ MicroData d = ReadFile(file);
+ if (d != null) {
+ File csv = new File(AltosLib.replace_extension(file.getPath(), ".csv"));
+ try {
+ System.out.printf ("Export \"%s\" to \"%s\"\n", file.getPath(), csv.getPath());
+ MicroExport.export(csv, d);
+ } catch (FileNotFoundException fe) {
+ System.err.printf("Cannot create file \"%s\" (%s)\n", csv.getName(), fe.getMessage());
+ } catch (IOException ie) {
+ System.err.printf("Cannot write file \"%s\" (%s)\n", csv.getName(), ie.getMessage());
+ }
+ }
+ } catch (IOException ie) {
+ System.err.printf("Cannot read file \"%s\" (%s)\n", file.getName(), ie.getMessage());
+ }
+ }
+