本文整理匯總了Java中com.onegravity.rteditor.converter.tagsoup.util.StringEscapeUtils類的典型用法代碼示例。如果您正苦於以下問題:Java StringEscapeUtils類的具體用法?Java StringEscapeUtils怎麽用?Java StringEscapeUtils使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StringEscapeUtils類屬於com.onegravity.rteditor.converter.tagsoup.util包,在下文中一共展示了StringEscapeUtils類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: writeEscUTF16
import com.onegravity.rteditor.converter.tagsoup.util.StringEscapeUtils; //導入依賴的package包/類
/**
* Write an array of data characters with escaping.
*
* @param ch The array of characters.
* @param start The starting position.
* @param length The number of characters to use.
* @param isAttVal true if this is an attribute value literal.
* @throws org.xml.SAXException If there is an error writing the characters, this method
* will throw an IOException wrapped in a SAXException.
*/
private void writeEscUTF16(String s, int start, int length, boolean isAttVal) throws SAXException {
String subString = s.substring(start, start + length);
write(StringEscapeUtils.escapeHtml4(subString));
}