Package org.mariadb.jdbc.util.log
Class LoggerHelper
java.lang.Object
org.mariadb.jdbc.util.log.LoggerHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
hex
(byte[] header, byte[] bytes, int offset, int dataLength, int trunkLength) static String
hex
(byte[] bytes, int offset, int dataLength) Write bytes/hexadecimal value of a byte array to a StringBuilder.static String
hex
(byte[] bytes, int offset, int dataLength, int trunkLength)
-
Field Details
-
hexArray
private static final char[] hexArray
-
-
Constructor Details
-
LoggerHelper
public LoggerHelper()
-
-
Method Details
-
hex
Write bytes/hexadecimal value of a byte array to a StringBuilder.String output example :
+--------------------------------------------------+ | 0 1 2 3 4 5 6 7 8 9 a b c d e f | +--------------------------------------------------+------------------+ | 5F 00 00 00 03 73 65 74 20 61 75 74 6F 63 6F 6D | _....set autocom | | 6D 69 74 3D 31 2C 20 73 65 73 73 69 6F 6E 5F 74 | mit=1, session_t | | 72 61 63 6B 5F 73 63 68 65 6D 61 3D 31 2C 20 73 | rack_schema=1, s | | 71 6C 5F 6D 6F 64 65 20 3D 20 63 6F 6E 63 61 74 | ql_mode = concat | | 28 40 40 73 71 6C 5F 6D 6F 64 65 2C 27 2C 53 54 | (@@sql_mode,',ST | | 52 49 43 54 5F 54 52 41 4E 53 5F 54 41 42 4C 45 | RICT_TRANS_TABLE | | 53 27 29 | S') | +--------------------------------------------------+------------------+
- Parameters:
bytes
- byte arrayoffset
- offsetdataLength
- byte length to write- Returns:
- formated hexa
-
hex
-
hex
-