code: public static BooleanSupplier booleanSupplier(CheckedBooleanSupplier supplier, Consumer<Throwable> handler) {
          return () -> {
              try {
                  return supplier.getAsBoolean();
              }
              catch (Throwable e) {
                  handler.accept(e);
  
                  throw new IllegalStateException("Exception handler must throw a RuntimeException", e);
              }
          };
      }
docs: Wrap a {@link CheckedBooleanSupplier} in a {@link BooleanSupplier} with a custom handler for checked exceptions.
  <p>
  Example:
  <code><pre>
  ResultSet rs = statement.executeQuery();
  
  Stream.generate(Unchecked.booleanSupplier(
  () -> rs.getBoolean(1),
  e -> {
  throw new IllegalStateException(e);
  }
  ));
  </pre></code>