Package org.djutils.decoderdumper
Class HexDumper
- java.lang.Object
-
- org.djutils.decoderdumper.Dumper<HexDumper>
-
- org.djutils.decoderdumper.HexDumper
-
public class HexDumper extends Dumper<HexDumper>
Dump data in hexadecimal format and (insofar possible) as characters.Copyright (c) 2013-2021 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUTILS License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Jan 3, 2019
- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
hexDumper(byte[] bytes)
Create a HexDumper object with addressOffset 0; use it to dump an array of bytes and return the dump as a String.static String
hexDumper(int addressOffset, byte[] bytes)
Create a HexDumper object; use it to dump an array of bytes and return the dump as a String.String
toString()
-
Methods inherited from class org.djutils.decoderdumper.Dumper
addDecoder, addDecoder, append, append, append, append, flush, getMaximumWidth, setOutputStream, setSuppressMultipleIdenticalLines
-
-
-
-
Method Detail
-
hexDumper
public static String hexDumper(int addressOffset, byte[] bytes)
Create a HexDumper object; use it to dump an array of bytes and return the dump as a String.- Parameters:
addressOffset
- int; address of the first bytebytes
- byte[]; the bytes to hex-dump- Returns:
- String; the hexadecimal and character dump of the
bytes
-
hexDumper
public static String hexDumper(byte[] bytes)
Create a HexDumper object with addressOffset 0; use it to dump an array of bytes and return the dump as a String.- Parameters:
bytes
- byte[]; the bytes to hex-dump- Returns:
- String; the hexadecimal and character dump of the
bytes
-
-