if ( printSuccess ) {
boolean doWrapper = !( "false".equals( request.getParameter( "wrapper" ) ) ); //$NON-NLS-1$ //$NON-NLS-2$
formatter.formatSuccessMessage( htmlMimeType, runtime, buffer, debugMessages, doWrapper );
} else {
response.resetBuffer();
formatter.formatFailureMessage( htmlMimeType, runtime, buffer, requestHandler.getMessages() );
}
outputStream.write( buffer.toString().getBytes( LocaleHelper.getSystemEncoding() ) );
responseContentItem.closeOutputStream();
}