commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Hoffstätte (JIRA) <j...@apache.org>
Subject [jira] Commented: (LANG-260) StringEscapeUtils should expose escape*() methods taking Writer argument
Date Thu, 01 Feb 2007 09:45:06 GMT

    [ https://issues.apache.org/jira/browse/LANG-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469387
] 

Holger Hoffstätte commented on LANG-260:
----------------------------------------

StringWriter is just a glorified StringBuffer and has exactly no performance advantage to
a correctly presized StringBuffer. I think the refactoring done for this has undone what I
just commented on in LANG-287.


> StringEscapeUtils should expose escape*() methods taking Writer argument
> ------------------------------------------------------------------------
>
>                 Key: LANG-260
>                 URL: https://issues.apache.org/jira/browse/LANG-260
>             Project: Commons Lang
>          Issue Type: Improvement
>         Environment: N/A
>            Reporter: Norval Hope
>             Fix For: 2.2
>
>
> StringEscapeUtils.escapeXML(String) is the only exposed variant, but the package private
Entities.XML class it uses under the covers has a variant taking a Writer. The StringEscapeUtils.escapeXML(Writer,
String) variant would be much more efficient when incrementally escaping values and adding
them one-by-one and could seemingly be exposed with very little effort. Ditto for the unescapeXML()
case, and presumably other styles of escape/unescape (like HTML) that use the Entities class
under the covers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message