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()

    Methods inherited from class org.djutils.decoderdumper.Dumper

    addDecoder, addDecoder, append, append, append, append, flush, getMaximumWidth, setOutputStream, setSuppressMultipleIdenticalLines

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SerialDataDumper

      public SerialDataDumper​(EndianUtil endianUtil, int addressOffset)
      Construct a new SerialDataDumper.
      Parameters:
      endianUtil - EndianUtil; used to decode multi-byte values
      addressOffset - int; address of the first byte that will be processed
    • SerialDataDumper

      public SerialDataDumper​(EndianUtil endianUtil)
      Construct a new SerialDataDumper.
      Parameters:
      endianUtil - EndianUtil; used to decode multi-byte values
  • Method Details

    • serialDataDumper

      public 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.
      Parameters:
      endianUtil - EndianUtil; used to decode multi-byte values
      addressOffset - int; address of the first byte
      bytes - byte[]; the bytes to hex-dump
      Returns:
      String; the hexadecimal and character dump of the bytes
    • serialDataDumper

      public 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.
      Parameters:
      endianUtil - EndianUtil; used to decode multi-byte values
      bytes - byte[]; the bytes to hex-dump
      Returns:
      String; the hexadecimal and character dump of the bytes
    • toString

      public String toString()
      Overrides:
      toString in class org.djutils.decoderdumper.Dumper<SerialDataDumper>