docs: private static void writeHex(byte[] bytes, int offset, int dataLength,
        StringBuilder outputBuilder) {
  
      if (bytes == null || bytes.length == 0) {
        return;
      }
  
      char[] hexaValue = new char[16];
      hexaValue[8] = ' ';
  
      int pos = offset;
      int posHexa = 0;
  
      while (pos < dataLength + offset) {
        int byteValue = bytes[pos] & 0xFF;
        outputBuilder.append(hexArray[byteValue >>> 4])
            .append(hexArray[byteValue & 0x0F])
            .append(" ");
  
        hexaValue[posHexa++] = (byteValue > 31 && byteValue < 127) ? (char) byteValue : '.';
  
        if (posHexa == 8) {
          outputBuilder.append(" ");
        }
        if (posHexa == 16) {
          outputBuilder.append("    ")
              .append(hexaValue)
              .append("\n");
          posHexa = 0;
        }
        pos++;
      }
  
      int remaining = posHexa;
      if (remaining > 0) {
        if (remaining < 8) {
          for (; remaining < 8; remaining++) {
            outputBuilder.append("   ");
          }
          outputBuilder.append(" ");
        }
  
        for (; remaining < 16; remaining++) {
          outputBuilder.append("   ");
        }
  
        outputBuilder.append("    ")
            .append(hexaValue, 0, posHexa)
            .append("\n");
      }
    }