Sink
490491492493494495496497498499500
+ "\n\n* list2" + "\n\n* list2{pre}123{/pre}" + "\n123"; output = new StringWriter(); Sink sink = new TextSink( new FilterWriter( output ) { public void close() throws IOException { super.close(); this.out = null;
524525526527528529530531532533534
throws ParseException { String document = "Up\n---\nDown\n"; output = new StringWriter(); Sink sink = new TextSink( output ); /* parsing with separator in middle of paragraph */ createParser().parse( new StringReader( document ), sink ); assertTrue( "generated document should have a size > 0", output.toString().length() > 0 );
638639640641642643644645646647
} private String getLineBreakString() { StringWriter sw = new StringWriter(); Sink sink = new TextSink( sw ); sink.lineBreak(); return sw.toString(); }
651652653654655656657658659660661
{ output = new StringWriter(); reader = getTestReader( stem, outputExtension() ); writer = getTestWriter( stem, "txt" ); Sink sink = new TextSink( output ); createParser().parse( reader, sink ); // write to file String expected = output.toString(); writer.write( expected );
111112113114115116117118119120121
{ writer = getTestWriter( "test", "txt" ); reader = getTestReader( "test", outputExtension() ); Sink sink = new TextSink( writer ); createParser().parse( reader, sink ); } finally {
110111112113114115116117118119120