Package com.jsql.util
Class StringUtil
java.lang.Object
com.jsql.util.StringUtil
Utility class adding String operations like join() which are not
part of standard JVM.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
static String
static String
static String
static String
static String
static String
static String
static String
detectUtf8
(String text) static String
formatReport
(Color color, String text) static String
fromBase64Zip
(String text) static String
static String
fromHexZip
(String text) static String
static String
static String
Convert a hexadecimal String to String.static boolean
static String
removeSqlComment
(String query) Remove SQL comments except tamper /**\/ /*!...static String
toBase64Zip
(String text) static String
toHexChunks
(byte[] fileData) static String
static String
static String
toHtmlDecimal
(String text) Convert special characters like Chinese and Arabic letters to the corresponding html entities.static String
static byte[]
uncloak
(byte[] fileData) static byte[]
xor
(byte[] plaintext, int key)
-
Field Details
-
GET
- See Also:
-
POST
- See Also:
-
INFORMATION_SCHEMA
- See Also:
-
APP_NAME
- See Also:
-
-
Method Details
-
toHtmlDecimal
Convert special characters like Chinese and Arabic letters to the corresponding html entities.- Parameters:
text
- string to encode- Returns:
- string encoded in html entities
-
hexstr
Convert a hexadecimal String to String.- Parameters:
hex
- Hexadecimal String to convert- Returns:
- The string converted from hex
-
isUtf8
-
detectUtf8
-
base32Encode
-
base32Decode
-
base58Encode
-
base58Decode
-
base16Encode
-
base16Decode
-
base64Decode
-
base64Encode
-
toHex
-
fromHex
-
toHexZip
- Throws:
IOException
-
fromHexZip
- Throws:
IOException
-
toBase64Zip
- Throws:
IOException
-
fromBase64Zip
- Throws:
IOException
-
toHtml
-
fromHtml
-
toUrl
-
fromUrl
-
cleanSql
-
removeSqlComment
Remove SQL comments except tamper /**\/ /*!...*\/ Negative lookahead: don't match tamper empty comment /**\/ or version comment /*!...*\/ JavaScript: (?!\/\*!.*\*\/|\/\*\*\/)\/\*.*\*\/ -
formatReport
-
xor
public static byte[] xor(byte[] plaintext, int key) -
toHexChunks
-
uncloak
public static byte[] uncloak(byte[] fileData)
-