Package org.djutils.serialization.util
Class SerialDataDumper
java.lang.Object
org.djutils.decoderdumper.Dumper<SerialDataDumper>
org.djutils.serialization.util.SerialDataDumper
Dumper for serialized data.
Copyright (c) 2019-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.
version Jun 27, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Constructor Summary
ConstructorDescriptionSerialDataDumper
(EndianUtil endianUtil) Construct a new SerialDataDumper.SerialDataDumper
(EndianUtil endianUtil, int addressOffset) Construct a new SerialDataDumper. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
serialDataDumper
(EndianUtil endianUtil, byte[] bytes) Create a SerialDataDumper object with addressOffset 0; use it to dump an array of bytes and return the dump as a String.static String
serialDataDumper
(EndianUtil endianUtil, int addressOffset, byte[] bytes) Create a SerialDataDumper object; use it to dump an array of bytes and return the dump as a String.toString()
Methods inherited from class org.djutils.decoderdumper.Dumper
addDecoder, addDecoder, append, append, append, append, flush, getMaximumWidth, setOutputStream, setSuppressMultipleIdenticalLines
-
Constructor Details
-
SerialDataDumper
Construct a new SerialDataDumper.- Parameters:
endianUtil
- EndianUtil; used to decode multi-byte valuesaddressOffset
- int; address of the first byte that will be processed
-
SerialDataDumper
Construct a new SerialDataDumper.- Parameters:
endianUtil
- EndianUtil; used to decode multi-byte values
-
-
Method Details
-
serialDataDumper
Create a SerialDataDumper object; use it to dump an array of bytes and return the dump as a String.- Parameters:
endianUtil
- EndianUtil; used to decode multi-byte valuesaddressOffset
- int; address of the first bytebytes
- byte[]; the bytes to hex-dump- Returns:
- String; the hexadecimal and character dump of the
bytes
-
serialDataDumper
Create a SerialDataDumper object with addressOffset 0; use it to dump an array of bytes and return the dump as a String.- Parameters:
endianUtil
- EndianUtil; used to decode multi-byte valuesbytes
- byte[]; the bytes to hex-dump- Returns:
- String; the hexadecimal and character dump of the
bytes
-
toString
- Overrides:
toString
in classorg.djutils.decoderdumper.Dumper<SerialDataDumper>
-