@Test public void testNicoLiveSAXHandler() throws ParserConfigurationException, SAXException, IOException { SAXParser sax = SAXParserFactory.newInstance().newSAXParser(); sax.parse(in, new NicoLiveSAXHandler() { @Override public void end(String uri, String localName, String qName) { if (qName.equals("elem")) { assertThat(innerText(), is("content")); } } }); }
public String innerText() { return sbuf.toString(); }
NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); } }
NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); }  }
NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); }  String innerText(); void start(String uri,
                      String localName,
                      String qName,
                      Attributes attributes); @Override final void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes); void end(String uri,
                    String localName,
                    String qName); @Override final void endElement(String uri,
                                 String localName,
                                 String qName); @Override final void characters(char[] ch, int start, int length); }
NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); }  String innerText(); void start(String uri,
                      String localName,
                      String qName,
                      Attributes attributes); @Override final void startElement(String uri,
                             String localName,
                             String qName,
                             Attributes attributes); void end(String uri,
                    String localName,
                    String qName); @Override final void endElement(String uri,
                                 String localName,
                                 String qName); @Override final void characters(char[] ch, int start, int length);  }