@Test public final void testParseHasLimitations() throws Exception { final String input = "<html><body>kiss!<p>xyz</p></body></html>"; reader = new StringReader(input); this.instance.parse(reader, writer); assertEquals("kiss!", writer.getBuffer().toString()); }
public void parse (Reader input, Writer output) throws Exception { this.input = input; this.output = output; int i; while (-1 != (i = input.read())) { this.c = (char)i; this.cnt++; switch (this.state) { case IN_BODY: this.handleInBody(); break; default: this.handleUnknown(); break; } } }
HtmlParser01 implements HtmlParser { public void parse (Reader input, Writer output) throws Exception { this.input = input; this.output = output; int i; while (-1 != (i = input.read())) { this.c = (char)i; this.cnt++; switch (this.state) { case IN_BODY: this.handleInBody(); break; default: this.handleUnknown(); break; } } } }
HtmlParser01 implements HtmlParser { public void parse (Reader input, Writer output) throws Exception { this.input = input; this.output = output; int i; while (-1 != (i = input.read())) { this.c = (char)i; this.cnt++; switch (this.state) { case IN_BODY: this.handleInBody(); break; default: this.handleUnknown(); break; } } }  }
HtmlParser01 implements HtmlParser { public void parse (Reader input, Writer output) throws Exception { this.input = input; this.output = output; int i; while (-1 != (i = input.read())) { this.c = (char)i; this.cnt++; switch (this.state) { case IN_BODY: this.handleInBody(); break; default: this.handleUnknown(); break; } } }  void parse(Reader input, Writer output); Reader getInput(); void setInput(Reader input); Writer getOutput(); void setOutput(Writer output); }
HtmlParser01 implements HtmlParser { public void parse (Reader input, Writer output) throws Exception { this.input = input; this.output = output; int i; while (-1 != (i = input.read())) { this.c = (char)i; this.cnt++; switch (this.state) { case IN_BODY: this.handleInBody(); break; default: this.handleUnknown(); break; } } }  void parse(Reader input, Writer output); Reader getInput(); void setInput(Reader input); Writer getOutput(); void setOutput(Writer output);  }