ByteArrayInputStream bais = new ByteArrayInputStream(content);
drain(new InputStreamReader(bais, WebContentPortlet.defaultEncoding), writer);
bais.close();
// done, cache results in the history and save the history
history.visitPage(currentPage);
PortletMessaging.publish(request, HISTORY, history);
}
public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException
{