Package io.micronaut.servlet.http.body
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
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.http.body.ByteBody
io.micronaut.http.body.ByteBody.BodyDiscardedException, io.micronaut.http.body.ByteBody.SplitBackpressureMode
-
Method Summary
Modifier and TypeMethodDescription@NonNull io.micronaut.http.body.CloseableByteBody
CompletableFuture<? extends io.micronaut.http.body.CloseableAvailableByteBody>
buffer()
void
close()
static InputStreamByteBody
create
(InputStream stream, OptionalLong length, Executor ioExecutor) @NonNull OptionalLong
@NonNull io.micronaut.http.body.CloseableByteBody
split
(io.micronaut.http.body.ByteBody.SplitBackpressureMode backpressureMode) @NonNull reactor.core.publisher.Flux<byte[]>
@NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ByteBuffer<?>>
@NonNull io.micronaut.servlet.http.body.ExtendedInputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.body.ByteBody
split
-
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
-
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
-