Uses of Class java.lang.Void (Java SE 26 & JDK 26)
Description: use: module: java.base, package: java.lang, class: Void

# Uses of Class
java.lang.Void

Packages that use Void
Package
Description
java.lang
Provides classes that are fundamental to the design of the Java programming language.
java.net.http
HTTP Client and WebSocket APIs
java.nio.channels
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
java.util.concurrent
Utility classes commonly useful in concurrent programming.
java.util.stream
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
javax.management.openmbean
Provides the open data types and Open MBean descriptor classes.

- ## Uses of Void in java.lang

  Fields in java.lang with type parameters of type Void
  Modifier and Type
  Field
  Description
  `static final Class<Void>`
  Void.`TYPE`
  The `Class` object representing the pseudo-type corresponding to the keyword `void`.

- ## Uses of Void in java.net.http

  Methods in java.net.http that return types with arguments of type Void
  Modifier and Type
  Method
  Description
  `static HttpResponse.BodyHandler<Void>`
  HttpResponse.BodyHandlers.`discarding()`
  Returns a response body handler that discards the response body.
  `static HttpResponse.BodySubscriber<Void>`
  HttpResponse.BodySubscribers.`discarding()`
  Returns a response subscriber which discards the response body.
  `static HttpResponse.BodyHandler<Void>`
  HttpResponse.BodyHandlers.`fromLineSubscriber(Flow.Subscriber<? super String> subscriber)`
  Returns a response body handler that returns a `BodySubscriber``<Void>` obtained from `BodySubscribers.fromLineSubscriber(subscriber, s -> null, charset, null)`, with the given `subscriber`.
  `static HttpResponse.BodySubscriber<Void>`
  HttpResponse.BodySubscribers.`fromLineSubscriber(Flow.Subscriber<? super String> subscriber)`
  Returns a body subscriber that forwards all response body to the given `Flow.Subscriber`, line by line.
  `static HttpResponse.BodyHandler<Void>`
  HttpResponse.BodyHandlers.`fromSubscriber(Flow.Subscriber<? super List<ByteBuffer>> subscriber)`
  Returns a response body handler that returns a `BodySubscriber``<Void>` obtained from `HttpResponse.BodySubscribers.fromSubscriber(Subscriber)`, with the given `subscriber`.
  `static HttpResponse.BodySubscriber<Void>`
  HttpResponse.BodySubscribers.`fromSubscriber(Flow.Subscriber<? super List<ByteBuffer>> subscriber)`
  Returns a body subscriber that forwards all response body to the given `Flow.Subscriber`.
  `static HttpResponse.BodyHandler<Void>`
  HttpResponse.BodyHandlers.`ofByteArrayConsumer(Consumer<Optional<byte[]>> consumer)`
  Returns a `BodyHandler<Void>` that returns a `BodySubscriber``<Void>` obtained from `BodySubscribers.ofByteArrayConsumer(Consumer)`.
  `static HttpResponse.BodySubscriber<Void>`
  HttpResponse.BodySubscribers.`ofByteArrayConsumer(Consumer<Optional<byte[]>> consumer)`
  Returns a `BodySubscriber` which provides the incoming body data to the provided Consumer of `Optional<byte[]>`.

- ## Uses of Void in java.nio.channels

  Methods in java.nio.channels that return types with arguments of type Void
  Modifier and Type
  Method
  Description
  `abstract Future<Void>`
  AsynchronousSocketChannel.`connect(SocketAddress remote)`
  Connects this channel.
  Method parameters in java.nio.channels with type arguments of type Void
  Modifier and Type
  Method
  Description
  `abstract <A> void`
  AsynchronousSocketChannel.`connect(SocketAddress remote, A attachment, CompletionHandler<Void, ? super A> handler)`
  Connects this channel.

- ## Uses of Void in java.util.concurrent

  Subclasses with type arguments of type Void in java.util.concurrent
  Modifier and Type
  Class
  Description
  `class`
  `RecursiveAction`
  A recursive resultless `ForkJoinTask`.
  Methods in java.util.concurrent that return Void
  Modifier and Type
  Method
  Description
  `final Void`
  RecursiveAction.`getRawResult()`
  Always returns `null`.
  Methods in java.util.concurrent that return types with arguments of type Void
  Modifier and Type
  Method
  Description
  `CompletableFuture<Void>`
  CompletableFuture.`acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)`
  `CompletionStage<Void>`
  CompletionStage.`acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, is executed with the corresponding result as argument to the supplied action.
  `CompletableFuture<Void>`
  CompletableFuture.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)`
  `CompletableFuture<Void>`
  CompletableFuture.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)`
  `CompletionStage<Void>`
  CompletionStage.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, is executed using `this` stage's default asynchronous execution facility, with the corresponding result as argument to the supplied action.
  `CompletionStage<Void>`
  CompletionStage.`acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, is executed using the supplied executor, with the corresponding result as argument to the supplied action.
  `static CompletableFuture<Void>`
  CompletableFuture.`allOf(CompletableFuture<?>... cfs)`
  Returns a new CompletableFuture that is completed when all of the given CompletableFutures complete.
  `static <T> StructuredTaskScope.JoinerPREVIEW<T,Void>`
  StructuredTaskScope.Joiner.`awaitAll()`
  Returns a new Joiner object that waits for all subtasks to complete.
  `static <T> StructuredTaskScope.JoinerPREVIEW<T,Void>`
  StructuredTaskScope.Joiner.`awaitAllSuccessfulOrThrow()`
  Returns a new Joiner object that waits for subtasks to complete successfully.
  `CompletableFuture<Void>`
  SubmissionPublisher.`consume(Consumer<? super T> consumer)`
  Processes all published items using the given Consumer function.
  `static <T> StructuredTaskScopePREVIEW<T,Void>`
  StructuredTaskScope.`open()`
  Opens a new `StructuredTaskScope` that can be used to fork subtasks that return results of any type.
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterBoth(CompletionStage<?> other, Runnable action)`
  `CompletionStage<Void>`
  CompletionStage.`runAfterBoth(CompletionStage<?> other, Runnable action)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, executes the given action.
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterBothAsync(CompletionStage<?> other, Runnable action)`
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)`
  `CompletionStage<Void>`
  CompletionStage.`runAfterBothAsync(CompletionStage<?> other, Runnable action)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, executes the given action using `this` stage's default asynchronous execution facility.
  `CompletionStage<Void>`
  CompletionStage.`runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, executes the given action using the supplied executor.
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterEither(CompletionStage<?> other, Runnable action)`
  `CompletionStage<Void>`
  CompletionStage.`runAfterEither(CompletionStage<?> other, Runnable action)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, executes the given action.
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterEitherAsync(CompletionStage<?> other, Runnable action)`
  `CompletableFuture<Void>`
  CompletableFuture.`runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)`
  `CompletionStage<Void>`
  CompletionStage.`runAfterEitherAsync(CompletionStage<?> other, Runnable action)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, executes the given action using `this` stage's default asynchronous execution facility.
  `CompletionStage<Void>`
  CompletionStage.`runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)`
  Returns a new CompletionStage that, when either `this` or the other given stage complete normally, executes the given action using the supplied executor.
  `static CompletableFuture<Void>`
  CompletableFuture.`runAsync(Runnable runnable)`
  Returns a new CompletableFuture that is asynchronously completed by a task running in the `ForkJoinPool.commonPool()` after it runs the given action.
  `static CompletableFuture<Void>`
  CompletableFuture.`runAsync(Runnable runnable, Executor executor)`
  Returns a new CompletableFuture that is asynchronously completed by a task running in the given executor after it runs the given action.
  `CompletableFuture<Void>`
  CompletableFuture.`thenAccept(Consumer<? super T> action)`
  `CompletionStage<Void>`
  CompletionStage.`thenAccept(Consumer<? super T> action)`
  Returns a new CompletionStage that, when `this` stage completes normally, is executed with `this` stage's result as the argument to the supplied action.
  `CompletableFuture<Void>`
  CompletableFuture.`thenAcceptAsync(Consumer<? super T> action)`
  `CompletableFuture<Void>`
  CompletableFuture.`thenAcceptAsync(Consumer<? super T> action, Executor executor)`
  `CompletionStage<Void>`
  CompletionStage.`thenAcceptAsync(Consumer<? super T> action)`
  Returns a new CompletionStage that, when `this` stage completes normally, is executed using `this` stage's default asynchronous execution facility, with `this` stage's result as the argument to the supplied action.
  `CompletionStage<Void>`
  CompletionStage.`thenAcceptAsync(Consumer<? super T> action, Executor executor)`
  Returns a new CompletionStage that, when `this` stage completes normally, is executed using the supplied Executor, with `this` stage's result as the argument to the supplied action.
  `<U> CompletableFuture<Void>`
  CompletableFuture.`thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action)`
  `<U> CompletionStage<Void>`
  CompletionStage.`thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, is executed with the two results as arguments to the supplied action.
  `<U> CompletableFuture<Void>`
  CompletableFuture.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action)`
  `<U> CompletableFuture<Void>`
  CompletableFuture.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor)`
  `<U> CompletionStage<Void>`
  CompletionStage.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, is executed using `this` stage's default asynchronous execution facility, with the two results as arguments to the supplied action.
  `<U> CompletionStage<Void>`
  CompletionStage.`thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T, ? super U> action, Executor executor)`
  Returns a new CompletionStage that, when `this` and the other given stage both complete normally, is executed using the supplied executor, with the two results as arguments to the supplied action.
  `CompletableFuture<Void>`
  CompletableFuture.`thenRun(Runnable action)`
  `CompletionStage<Void>`
  CompletionStage.`thenRun(Runnable action)`
  Returns a new CompletionStage that, when `this` stage completes normally, executes the given action.
  `CompletableFuture<Void>`
  CompletableFuture.`thenRunAsync(Runnable action)`
  `CompletableFuture<Void>`
  CompletableFuture.`thenRunAsync(Runnable action, Executor executor)`
  `CompletionStage<Void>`
  CompletionStage.`thenRunAsync(Runnable action)`
  Returns a new CompletionStage that, when `this` stage completes normally, executes the given action using `this` stage's default asynchronous execution facility.
  `CompletionStage<Void>`
  CompletionStage.`thenRunAsync(Runnable action, Executor executor)`
  Returns a new CompletionStage that, when `this` stage completes normally, executes the given action using the supplied Executor.
  Methods in java.util.concurrent with parameters of type Void
  Modifier and Type
  Method
  Description
  `protected final void`
  RecursiveAction.`setRawResult(Void mustBeNull)`
  Requires null completion value.

- ## Uses of Void in java.util.stream

  Methods in java.util.stream that return types with arguments of type Void
  Modifier and Type
  Method
  Description
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  Method parameters in java.util.stream with type arguments of type Void
  Modifier and Type
  Method
  Description
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`of(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, parallelizable, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator` and `finisher`.
  `static <T,R> Gatherer<T,Void,R>`
  Gatherer.`ofSequential(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)`
  Returns a new, sequential, and stateless `Gatherer` described by the given `integrator` and `finisher`.

- ## Uses of Void in javax.management.openmbean

  Fields in javax.management.openmbean with type parameters of type Void
  Modifier and Type
  Field
  Description
  `static final SimpleType<Void>`
  SimpleType.`VOID`
  The `SimpleType` instance describing values whose Java class name is `java.lang.Void`.