code: private static String getHexString(BitSet bitSet) {
      StringBuilder builder = new StringBuilder();
  
      // Build the hex string.
      for (byte byteEntry : bitSet.toByteArray()) {
        // Java bytes are signed, but we want the value as if it were unsigned.
        int value = UnsignedBytes.toInt(byteEntry);
        String hexString = Integer.toHexString(value);
  
        // Pad string to be two characters (if it isn't already).
        hexString = Strings.padStart(hexString, 2, '0');
  
        builder.append(hexString);
      }
  
      return builder.toString();
    }
docs: Returns a byte-wise hex string representation of the BitField from
  MSB (Most Significant Byte) to LSB (Least Significant Byte).
  Eg. Single byte: a setting of "0001 1111", returns "1f"
  Eg. Multiple bytes: a setting of "0000 0010 0001 1111", returns "1f02"
  
  @return string representation of bits set