if ( wrapString!=null ) {
n = out.writeWrapSeparator(wrapString);
}
// check if formatting needs to be applied to the stToWrite
if ( formatString != null ) {
AttributeRenderer renderer =
self.getAttributeRenderer(String.class);
if ( renderer != null ) {
// you pay a penalty for applying format option to a template
// because the template must be written to a temp StringWriter so it can
// be formatted before being written to the real output.
StringWriter buf = new StringWriter();
StringTemplateWriter sw =
self.getGroup().getStringTemplateWriter(buf);
stToWrite.write(sw);
n = out.write(renderer.toString(buf.toString(), formatString));
return n;
}
}
n = stToWrite.write(out);
}