docs: public static void checkFlagsArgument(final int requestedFlags, final int allowedFlags) {
          if ((requestedFlags & allowedFlags) != requestedFlags) {
              throw new IllegalArgumentException("Requested flags 0x"
                      + Integer.toHexString(requestedFlags) + ", but only 0x"
                      + Integer.toHexString(allowedFlags) + " are allowed");
          }
      }