@Test public void testWrite() throws Exception { StringWriter buf = new StringWriter(); PirasoEntryWriter writer = new PirasoEntryWriter("1", "2", new PrintWriter(buf)); writer.write(new MessageEntry(1l, "message")); writer.close(); String actual = buf.toString(); System.out.println(actual); assertTrue(actual.contains("id=\"1\"")); assertTrue(actual.contains("watched-address=\"2\"")); assertTrue(actual.contains("message")); assertTrue(actual.contains(MessageEntry.class.getName())); }
public void write(Date date, Entry entry) throws ParserConfigurationException, SAXException, IOException, TransformerException { writer.println(createXMLString(date, entry)); writer.flush(); }
PirasoEntryWriter implements Closeable { public void write(Date date, Entry entry) throws ParserConfigurationException, SAXException, IOException, TransformerException { writer.println(createXMLString(date, entry)); writer.flush(); } }
PirasoEntryWriter implements Closeable { public void write(Date date, Entry entry) throws ParserConfigurationException, SAXException, IOException, TransformerException { writer.println(createXMLString(date, entry)); writer.flush(); } PirasoEntryWriter(String id, String watchedAddr, PrintWriter writer); }
PirasoEntryWriter implements Closeable { public void write(Date date, Entry entry) throws ParserConfigurationException, SAXException, IOException, TransformerException { writer.println(createXMLString(date, entry)); writer.flush(); } PirasoEntryWriter(String id, String watchedAddr, PrintWriter writer); void write(Date date, Entry entry); void write(Entry entry); void close(); }
PirasoEntryWriter implements Closeable { public void write(Date date, Entry entry) throws ParserConfigurationException, SAXException, IOException, TransformerException { writer.println(createXMLString(date, entry)); writer.flush(); } PirasoEntryWriter(String id, String watchedAddr, PrintWriter writer); void write(Date date, Entry entry); void write(Entry entry); void close();  }