Class HexDump

java.lang.Object
com.adaptris.util.text.HexDump

public final class HexDump extends Object
A utility class to perform a hexdump of a given number of bytes.
  • Method Details

    • parse

      public static String parse(byte[] bytes)
      Get a string suitable for printing out.

      Equivalent to calling parse(b, 0, b.length);

      See Also:
    • parse

      public static String parse(byte[] bytes, int offset, int length)
      Get a string suitable for printing out.

      What you get is.

       
       [54] [68] [65] [20] [71] [75] [69] [63] [6b] [20] [62] [72]    The quick br
       [6f] [77] [6e] [20] [66] [6f] [78] [20] [6a] [75] [6d] [70]    own fox jump
       [73] [20] [6f] [76] [65] [72] [20] [74] [68] [65] [20] [6c]    s over the l
       [61] [7a] [79] [20] [64] [6f] [67]                             azy dog
       Total Bytes 43
       
       

      Unprintable "ASCII" characters (< 32, > 255) are represented by a "."

      Parameters:
      bytes - the bytes to create hexdump of
      offset - the offset to start from.
      length - the number of bytes to print out
      Returns:
      a string in the format described