use of com.sun.faces.io.FastStringWriter in project mojarra by eclipse-ee4j.
the class HtmlResponseWriter method closeStartIfNecessary.
/**
* This method automatically closes a previous element (if not already closed).
*
* @throws IOException if an error occurs writing
*/
private void closeStartIfNecessary() throws IOException {
if (closeStart) {
flushAttributes();
writer.write('>');
closeStart = false;
if (isScriptOrStyle() && !scriptOrStyleSrc) {
isXhtml = getContentType().equals(RIConstants.XHTML_CONTENT_TYPE);
if (isXhtml) {
if (!writingCdata) {
if (isScript) {
writer.write("\n//<![CDATA[\n");
} else {
writer.write("\n<![CDATA[\n");
}
}
} else {
if (isScriptHidingEnabled) {
writer.write("\n<!--\n");
}
}
origWriter = writer;
if (scriptBuffer == null) {
scriptBuffer = new FastStringWriter(1024);
}
scriptBuffer.reset();
writer = scriptBuffer;
isScript = false;
isStyle = false;
}
}
}
use of com.sun.faces.io.FastStringWriter in project mojarra by eclipse-ee4j.
the class DebugUtil method printTree.
/**
* @param root the root component
* @return the output of printTree() as a String. Useful when used with a Logger. For example:
* logger.log(DebugUtil.printTree(root));
*/
public static String printTree(UIComponent root) {
Writer writer = new FastStringWriter(1024);
printTree(root, writer);
return writer.toString();
}
Aggregations