}
}
public PrintWriter getWriter() throws IOException
{
CharBuffer charBuffer;
if (buffer != null)
{
if (buffer instanceof CharBuffer)
{
charBuffer = (CharBuffer)buffer;
}
else
{
throw new IllegalStateException("The method getPortletOutputStream() was already called");
}
}
else
{
buffer = charBuffer = new CharBuffer();
}
return charBuffer.getWriter();
}