public void saveFile(File f) { String path = f.getAbsolutePath(); try (RandomAccessInputStream in = new RandomAccessInputStream(path); RandomAccessOutputStream out = new RandomAccessOutputStream(path)){ String xml = getXML(); TiffSaver saver = new TiffSaver(out, path); saver.overwriteComment(in, xml); } catch (FormatException exc) { showError(exc); } catch (IOException exc) { showError(exc); } }
public void saveFile(File f) { String path = f.getAbsolutePath(); try (RandomAccessInputStream in = new RandomAccessInputStream(path); RandomAccessOutputStream out = new RandomAccessOutputStream(path)){ String xml = getXML(); TiffSaver saver = new TiffSaver(out, path); saver.overwriteComment(in, xml); } catch (FormatException exc) { showError(exc); } catch (IOException exc) { showError(exc); } }
public void openFile(File f) { try { String id = f.getAbsolutePath(); String xml = new TiffParser(id).getComment(); setXML(xml); file = f; setTitle(TITLE + " - " + id); } catch (IOException exc) { showError(exc); } }
public void openFile(File f, RandomAccessInputStream in) { try { String id = f.getAbsolutePath(); String xml = new TiffParser(in).getComment(); setXML(xml); file = f; setTitle(TITLE + " - " + id); } catch (IOException exc) { showError(exc); } }
public void openFile(File f) { try { String id = f.getAbsolutePath(); String xml = new TiffParser(id).getComment(); setXML(xml); file = f; setTitle(TITLE + " - " + id); } catch (IOException exc) { showError(exc); } }
public void openFile(File f, RandomAccessInputStream in) { try { String id = f.getAbsolutePath(); String xml = new TiffParser(in).getComment(); setXML(xml); file = f; setTitle(TITLE + " - " + id); } catch (IOException exc) { showError(exc); } }