Improve string concatenation.

This commit is contained in:
Christian P. MOMON 2013-07-03 00:48:19 +02:00
parent 27c38081b2
commit 200fb1f3f4

View file

@ -52,7 +52,11 @@ public class StringPresenter extends DomPresenter
}
else
{
htmlSource = "<html><head></head><body>\n" + html + "</body></html>";
StringBuffer buffer = new StringBuffer(html.length() + 100);
buffer.append("<html><head></head><body>\n");
buffer.append(html);
buffer.append("</body></html>");
htmlSource = buffer.toString();
}
// StringBufferInputStream is deprecated so we use another solution.
@ -104,15 +108,6 @@ public class StringPresenter extends DomPresenter
return (dynamize(datas.getIdsDataById()));
}
/**
*
*/
public void setSource(final String html)
{
this.html = html;
this.doc = null;
}
/**
*
*/
@ -127,6 +122,15 @@ public class StringPresenter extends DomPresenter
return (result);
}
/**
*
*/
public void setSource(final String html)
{
this.html = html;
this.doc = null;
}
/**
* Xid a string with html in.
*/