public final class LoggerHelper extends Object
| Constructor and Description |
|---|
LoggerHelper() |
| Modifier and Type | Method and Description |
|---|---|
static 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) |
public static String hex(byte[] bytes, int offset, int dataLength)
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') |
+--------------------------------------------------+------------------+
bytes - byte arrayoffset - offsetdataLength - byte length to writepublic static String hex(byte[] bytes, int offset, int dataLength, int trunkLength)
public static String hex(byte[] header, byte[] bytes, int offset, int dataLength, int trunkLength)
Copyright © 2022 SingleStore. All rights reserved.