Class HexModel

    • Field Detail

      • data

        private final java.util.List<java.lang.Byte> data
    • Constructor Detail

      • HexModel

        HexModel​(byte[] bytes)
        Constructor
        Parameters:
        bytes - Byte array.
    • Method Detail

      • getByte

        public byte getByte​(int index)
        provides the byte for a specific index of the byte array.
        Parameters:
        index - int.
        Returns:
        byte instance
      • getLineChars

        public char[] getLineChars​(int lineNumber)
        Provides a character array of 16 characters on availability.
        Parameters:
        lineNumber - int. The line number of the characters. Line counting starts from 1.
        Returns:
        A char array.
      • getBytesForLine

        public byte[] getBytesForLine​(int lineNumber)
      • size

        public int size()
        Provides the size of the model i.e. size of the input.
        Returns:
        int value.
      • totalLine

        public int totalLine()
        Returns:
      • lineNumber

        public static int lineNumber​(int index)
      • elementIndexInLine

        public static int elementIndexInLine​(int index)
      • isAsciiPrintable

        private static boolean isAsciiPrintable​(char ch)
      • updateModel

        public void updateModel​(int index,
                                byte value)
      • fireModelChanged

        private void fireModelChanged​(int index)