Package org.exoplatform.commons.utils
Class StringCommonUtils
java.lang.Object
org.exoplatform.commons.utils.StringCommonUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamstatic Stringstatic StringdecodeSpecialCharToHTMLnumber(String s, List<String> lIgnore) static StringDecode special chars to HTML number ignore char Less than '<' and Greater than '>'static Stringstatic StringEncode special character, use for input title or name of the object.static StringEncode special character, use for input content of object (only apply for input by CKEditer).static StringEncode special character, use for input searchstatic StringencodeSpecialCharToHTMLnumber(String s, String charIgnore, boolean isTitle) Encode special character to html number.static boolean
-
Field Details
-
EMPTY_STR
- See Also:
-
SEMICOLON
- See Also:
-
SPACE
- See Also:
-
AMP_NUMBER
- See Also:
-
LESS_THAN
- See Also:
-
GREATER_THAN
- See Also:
-
QUOT
- See Also:
-
AMP_SPACE
- See Also:
-
AMP_HEX
- See Also:
-
AMP
- See Also:
-
-
Constructor Details
-
StringCommonUtils
public StringCommonUtils()
-
-
Method Details
-
compress
- Throws:
IOException
-
decompress
- Throws:
IOException
-
encodeSpecialCharInSearchTerm
Encode special character, use for input search- Parameters:
s- the string input- Returns:
- String
-
encodeSpecialCharForSimpleInput
Encode special character, use for input title or name of the object.- Parameters:
s- the string input- Returns:
- String
-
encodeSpecialCharInHTML
Encode special character, use for input content of object (only apply for input by CKEditer).- Parameters:
s- the string input- Returns:
- String
-
isContainSpecialCharacter
-
encodeSpecialCharToHTMLnumber
Encode special character to html number. Ex: '/' is encoded to /- Parameters:
s- the string inputcharIgnore- the string content ignore some special character can not encode.isTitle- the boolean for check convert is title or not.- Returns:
- String
-
decodeSpecialCharToHTMLnumber
-
decodeSpecialCharToHTMLnumber
-
decodeSpecialCharToHTMLnumberIgnore
Decode special chars to HTML number ignore char Less than '<' and Greater than '>'- Parameters:
str-- Returns:
-