/** * serializes the given objects to the specified file. * * @param filename the file to write the object to * @param o the objects to serialize * @throws Exception if serialization fails */ public static void writeAll(String filename, Object[] o) throws Exception { writeAll(new FileOutputStream(filename), o); }
/** * serializes the given objects to the specified file. * * @param filename the file to write the object to * @param o the objects to serialize * @throws Exception if serialization fails */ public static void writeAll(String filename, Object[] o) throws Exception { writeAll(new FileOutputStream(filename), o); }
@Override public void actionPerformed(ActionEvent e) { int retVal = getFileChooser().showSaveDialog(null); if (retVal != MekaFileChooser.APPROVE_OPTION) return; File file = getFileChooser().getSelectedFile(); try { SerializationHelper.writeAll(file.getAbsolutePath(), (Object[]) history.getPayloadAt(index)); } catch (Exception ex) { String msg = "Failed to write model to '" + file + "'!"; System.err.println(msg); ex.printStackTrace(); JOptionPane.showMessageDialog( null, msg + "\n" + e); } } };
@Override public void actionPerformed(ActionEvent e) { int retVal = getFileChooser().showSaveDialog(null); if (retVal != MekaFileChooser.APPROVE_OPTION) return; File file = getFileChooser().getSelectedFile(); try { SerializationHelper.writeAll(file.getAbsolutePath(), (Object[]) history.getPayloadAt(index)); } catch (Exception ex) { String msg = "Failed to write model to '" + file + "'!"; System.err.println(msg); ex.printStackTrace(); JOptionPane.showMessageDialog( null, msg + "\n" + e); } } };
SerializationHelper.writeAll(dname, new Object[]{h, dataHeader});
SerializationHelper.writeAll(dname, new Object[]{h, dataHeader});
SerializationHelper.writeAll(dname, new Object[]{h, dataHeader});
SerializationHelper.writeAll(dname, new Object[]{h, dataHeader});