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 Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic StringdetectUtf8(String text) static StringformatReport(Color color, String text) static StringfromBase64Zip(String text) static Stringstatic StringfromHexZip(String text) static Stringstatic Stringstatic Stringstatic StringConvert a hexadecimal String to String.static booleanstatic StringremoveSqlComment(String query) Remove SQL comments except tamper /**\/ /*!...static StringtoBase64Zip(String text) static StringtoHexChunks(byte[] fileData) static Stringstatic Stringstatic StringtoHtmlDecimal(String text) Convert special characters like Chinese and Arabic letters to the corresponding html entities.static Stringstatic 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
-
getFile
-
uncloak
public static byte[] uncloak(byte[] fileData)
-