Improve string concatenation.
This commit is contained in:
parent
27c38081b2
commit
200fb1f3f4
1 changed files with 14 additions and 10 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue