code: static Map<String, BitSet> readCapabilities(File sysPath) {
          Map<String, BitSet> capsMap = new HashMap<String, BitSet>();
          File[] capsFiles = new File(sysPath, "device/capabilities").listFiles();
          if (capsFiles == null) {
              return capsMap;
          }
          for (int i = 0; i < capsFiles.length; i++) {
              try {
                  BufferedReader r = new BufferedReader(new FileReader(capsFiles[i]));
                  String s = r.readLine();
                  r.close();
                  if (s == null) {
                      continue;
                  }
                  String[] elements = s.split(" ");
                  if (elements == null) {
                      continue;
                  }
                  byte[] b = new byte[elements.length * (LinuxArch.is64Bit() ? 8 : 4)];
                  ByteBuffer bb = ByteBuffer.wrap(b);
                  bb.order(ByteOrder.LITTLE_ENDIAN);
                  for (int j = elements.length - 1; j >= 0; j--) {
                      if (LinuxArch.is64Bit()) {
                          bb.putLong(Long.parseUnsignedLong(elements[j], 16));
                      } else {
                          bb.putInt(Integer.parseUnsignedInt(elements[j], 16));
                      }
                  }
                  capsMap.put(capsFiles[i].getName(), BitSet.valueOf(b));
              } catch (IOException | RuntimeException e) {
                  e.printStackTrace();
              }
          }
          return capsMap;
      }
docs: Read input device capability data from sysfs