Class IoBufferHexDumper

    • Constructor Detail

      • IoBufferHexDumper

        IoBufferHexDumper()
    • Method Detail

      • getHexDumpSlice

        public static String getHexDumpSlice​(IoBuffer buf,
                                             int offset,
                                             int length)
        Dumps an IoBuffer to a hex formatted string.
        Parameters:
        buf - the buffer to dump
        offset - the starting position to begin reading the hex dump
        length - the number of bytes to dump
        Returns:
        a hex formatted string representation of the in IoBuffer.
      • getPrettyHexDumpSlice

        public static final String getPrettyHexDumpSlice​(IoBuffer buf,
                                                         int offset,
                                                         int length)
        Produces a verbose hex dump
        Parameters:
        offset - initial position which to read bytes
        length - number of bytes to display
        Returns:
        The formatted String representing the content between (offset) and (offset+count)
      • toPrettyHexDump

        public static final String toPrettyHexDump​(byte[] data,
                                                   int pos,
                                                   int len)
        Generates a hex dump with line numbers, hex, volumes, and ascii representation
        Parameters:
        data - source data to read for the hex dump
        pos - index position to begin reading
        len - number of bytes to read
        Returns:
        string hex dump
      • toHex

        public static final String toHex​(byte b)