int ITERATIONS = 1000;
for (int j = 0; j < 10; j++) {
long start = System.currentTimeMillis();
for (int i = 0; i < ITERATIONS; i++) {
Writer hawriter = new StateAwareWriter<HtmlState>(new NullWriter(), new HtmlState());
hawriter.write(value);
hawriter.close();
}
long end = System.currentTimeMillis();
System.out.println(end - start);