Java escape HTML - string replace slow?

后端 未结 8 580
长情又很酷
长情又很酷 2021-01-22 17:34

I have a Java application that makes heavy use of a large file, to read, process and give through to SolrEmbeddedServer (http://lucene.apache.org/solr/).

One of the func

8条回答
  •  生来不讨喜
    2021-01-22 17:53

    For html escaping you can use StringEscapeUtils.escapeHtml(input) from commons-lang. It is supposedly implemented in a more efficient way there.

提交回复
热议问题