@Test
public void testJapid() throws InterruptedException {
List<Post> posts = createPosts();
// AllPost te = new AllPost(new
// org.apache.commons.io.output.ByteArrayOutputStream());
AllPost te = new AllPost(new StringBuilder(8000));
long t = System.currentTimeMillis();
long tt = System.currentTimeMillis();
for (int i = 0; i < 100; i++) {
// System.out.println("run templating: " + i);
// StringWriter out = new StringWriter(1000);
// PrintWriter printWriter = new PrintWriter(out);
te = new AllPost(new StringBuilder(1000));
t = System.currentTimeMillis();
te.render("抬头", posts);
System.out.println(System.currentTimeMillis() - t);
// System.out.println(out.toString());
// Thread.sleep(5);
}
System.out.println("total time: " + (System.currentTimeMillis() - tt));