List of usage examples for javax.servlet.jsp JspWriter toString
public String toString()
From source file:FastByteArrayOutputStream.java
protected void implementEncodingTest(final String srcStr, final String encoding, final int bufferSize) throws Exception { FastByteArrayOutputStream bout = new FastByteArrayOutputStream(bufferSize); byte[] bytes = srcStr.getBytes(encoding); bout.write(bytes);//from w ww .ja v a 2 s .c om JspWriter writer = new StringCapturingJspWriter(); bout.writeTo(writer, encoding); String actualStr = writer.toString(); String expectedStr = new String(bytes, encoding); assertTheyAreEqual(expectedStr, actualStr, encoding); }