Example usage for javax.servlet.jsp JspWriter toString

List of usage examples for javax.servlet.jsp JspWriter toString

Introduction

In this page you can find the example usage for javax.servlet.jsp JspWriter toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

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);
    }