Package org.djutils.serialization.util
Class SerialDataDumper
java.lang.Object
org.djutils.decoderdumper.Dumper<SerialDataDumper>
org.djutils.serialization.util.SerialDataDumper
public class SerialDataDumper extends org.djutils.decoderdumper.Dumper<SerialDataDumper>
Dumper for serialized data.
Copyright (c) 2019-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
version Jun 27, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers
-
Constructor Summary
Constructors Constructor Description SerialDataDumper(EndianUtil endianUtil)
Construct a new SerialDataDumper.SerialDataDumper(EndianUtil endianUtil, int addressOffset)
Construct a new SerialDataDumper. -
Method Summary
Modifier and Type Method Description static 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.String
toString()
-
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>
-