Package org.mariadb.jdbc.util.log
Class LoggerHelper
- java.lang.Object
-
- org.mariadb.jdbc.util.log.LoggerHelper
-
public final class LoggerHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static char[]
hexArray
-
Constructor Summary
Constructors Constructor Description LoggerHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
hex(byte[] header, byte[] bytes, int offset, int dataLength, int trunkLength)
static java.lang.String
hex(byte[] bytes, int offset, int dataLength)
Write bytes/hexadecimal value of a byte array to a StringBuilder.static java.lang.String
hex(byte[] bytes, int offset, int dataLength, int trunkLength)
-
-
-
Method Detail
-
hex
public static java.lang.String hex(byte[] bytes, int offset, int dataLength)
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
public static java.lang.String hex(byte[] bytes, int offset, int dataLength, int trunkLength)
-
hex
public static java.lang.String hex(byte[] header, byte[] bytes, int offset, int dataLength, int trunkLength)
-
-