コード例 #1
0
  public void saveGlyphFile(OutputStream a_output) {
    try {
      Transformer transformer = getTransformer();
      Document document = m_glyph.makeDocument();
      DOMSource source = new DOMSource(document);
      StreamResult result = new StreamResult(a_output);
      transformer.transform(source, result);
    } catch (ParserConfigurationException | TransformerException e) {
      e.printStackTrace();
    }

    m_savedTime = System.currentTimeMillis();
    m_modifiedTime = m_savedTime;
  }
コード例 #2
0
 public Memento createMemento(String a_description) {
   m_modifiedTime = System.currentTimeMillis();
   byte[] bytes = m_glyph.makeTextDocument().getBytes();
   return new Memento(a_description, bytes);
 }