|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.DataLogger
public final class DataLogger
Utility class that provides a queue for binary data to be logged as hex dump on request at a later time. The recording and logging methods will return immediately without locking or copying data if the logging level for this class's logger isn't set to a value greater than TRACE. The logger's name is .
| Field Summary | |
|---|---|
static int |
DEFAULT_QUEUE_LENGTH
The default data queue length. |
static String |
LOGGER_NAME
The name of the logger used for data logging. |
| Method Summary | |
|---|---|
static void |
logRecordedData()
Logs the recorded data in hex dump format and empties the data queue, if the logging level is set to trace. |
static void |
recordData(byte[] data)
Copies the given data into the queue for later logging, if the logging level is set to trace. |
static void |
recordData(byte[] data,
int offset,
int length)
Copies the given data into the queue for later logging, if the logging level is set to trace. |
static void |
setQueueLength(int length)
Logs all existing data and resets the queue to the given length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOGGER_NAME
public static final int DEFAULT_QUEUE_LENGTH
| Method Detail |
|---|
public static void setQueueLength(int length)
length - the new queue lengthpublic static void recordData(byte[] data)
data - the data to log.recordData(byte[], int, int)
public static void recordData(byte[] data,
int offset,
int length)
data - the data to logoffset - the offset from which to start the logginglength - the total number of bytes to log
ArrayIndexOutOfBoundsException - if offset is negative, or greater or equal
data.lengthpublic static void logRecordedData()
CommonUtil.printHexDump(PrintWriter, byte[], int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||