Class InputStreamByteBody

java.lang.Object
io.micronaut.servlet.http.body.InputStreamByteBody
All Implemented Interfaces:
io.micronaut.http.body.ByteBody, io.micronaut.http.body.CloseableByteBody, Closeable, AutoCloseable

@Internal public final class InputStreamByteBody extends Object
Streaming ByteBody implementation for servlet.

Note: While internal, this is also used from the Azure, AWS and GCP modules.

Since:
4.9.0
Author:
Jonas Konrad
  • Method Details

    • create

      public static InputStreamByteBody create(InputStream stream, OptionalLong length, Executor ioExecutor)
    • allowDiscard

      @NonNull public @NonNull io.micronaut.http.body.CloseableByteBody allowDiscard()
    • close

      public void close()
    • split

      @NonNull public @NonNull io.micronaut.http.body.CloseableByteBody split(io.micronaut.http.body.ByteBody.SplitBackpressureMode backpressureMode)
    • expectedLength

      @NonNull public @NonNull OptionalLong expectedLength()
    • toInputStream

      @NonNull public @NonNull io.micronaut.servlet.http.body.ExtendedInputStream toInputStream()
    • toByteArrayPublisher

      @NonNull public @NonNull reactor.core.publisher.Flux<byte[]> toByteArrayPublisher()
    • toByteBufferPublisher

      @NonNull public @NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ByteBuffer<?>> toByteBufferPublisher()
    • buffer

      public CompletableFuture<? extends io.micronaut.http.body.CloseableAvailableByteBody> buffer()