Package io.micronaut.http.body
Interface CloseableAvailableByteBody
- All Superinterfaces:
AutoCloseable
,AvailableByteBody
,ByteBody
,Closeable
,CloseableByteBody
- All Known Implementing Classes:
AvailableByteArrayBody
,AvailableNettyByteBody
Combination of
CloseableByteBody
and AvailableByteBody
. See their
documentation for details.- Since:
- 4.5.0
- Author:
- Jonas Konrad
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.http.body.ByteBody
ByteBody.BodyDiscardedException, ByteBody.SplitBackpressureMode
-
Method Summary
Methods inherited from interface io.micronaut.http.body.AvailableByteBody
expectedLength, length, split, split, toByteArray, toByteArrayPublisher, toByteBuffer, toByteBufferPublisher, toString
Methods inherited from interface io.micronaut.http.body.ByteBody
buffer, toInputStream
Methods inherited from interface io.micronaut.http.body.CloseableByteBody
close
-
Method Details
-
allowDiscard
Deprecated.This method is unnecessary forAvailableByteBody
, it does nothing.Signal that the upstream may discard any remaining body data. Only if all consumers of the body allow discarding will the body be discarded, otherwise it will still be sent to all consumers. It is an optional operation.Discarding may be implemented e.g. by closing the input side of an HTTP/2 stream.
This method must be called before any primary operation.
- Specified by:
allowDiscard
in interfaceAvailableByteBody
- Specified by:
allowDiscard
in interfaceByteBody
- Specified by:
allowDiscard
in interfaceCloseableByteBody
- Returns:
- This body
-
AvailableByteBody
, it does nothing.