Class XSSFRichTextStringHelper


  • public class XSSFRichTextStringHelper
    extends java.lang.Object
    A helper to access XSSFRichTextString's APIs.
    Author:
    jumperchen
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addRun​(XSSFRichTextString richTextString, java.lang.String text, XSSFFont font)  
      static java.lang.String utfEncode​(java.lang.String value)
      For all characters which cannot be represented in XML as defined by the XML 1.0 specification, the characters are escaped using the Unicode numerical character representation escape character format _xHHHH_, where H represents a hexadecimal character in the character's value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XSSFRichTextStringHelper

        public XSSFRichTextStringHelper()
    • Method Detail

      • utfEncode

        public static java.lang.String utfEncode​(java.lang.String value)
        For all characters which cannot be represented in XML as defined by the XML 1.0 specification, the characters are escaped using the Unicode numerical character representation escape character format _xHHHH_, where H represents a hexadecimal character in the character's value.

        Example: The Unicode character 0D is invalid in an XML 1.0 document, so it shall be escaped as _x000D_.

        See section 3.18.9 in the OOXML spec.
        Parameters:
        value - the string to encode
        Returns:
        the encoded string
        Since:
        3.9.10