Class AvailableNettyByteBody

java.lang.Object
io.micronaut.http.body.InternalByteBody
io.micronaut.http.netty.body.AvailableNettyByteBody
All Implemented Interfaces:
io.micronaut.http.body.AvailableByteBody, io.micronaut.http.body.ByteBody, io.micronaut.http.body.CloseableAvailableByteBody, io.micronaut.http.body.CloseableByteBody, Closeable, AutoCloseable

@Internal @Deprecated(since="4.10.0", forRemoval=true) public final class AvailableNettyByteBody extends io.micronaut.http.body.InternalByteBody implements io.micronaut.http.body.CloseableAvailableByteBody
Deprecated, for removal: This API element is subject to removal in a future version.
Netty ByteBuf implementation of ImmediateByteBody.
Since:
4.5.0
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
    AvailableNettyByteBody(@NonNull io.netty.buffer.ByteBuf buffer)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull io.micronaut.core.execution.ExecutionFlow<? extends io.micronaut.http.body.CloseableAvailableByteBody>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static @NonNull io.micronaut.http.body.CloseableByteBody
    createChecked(@NonNull io.netty.channel.EventLoop loop, @NonNull io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits, @NonNull io.netty.buffer.ByteBuf buf)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This is a wrapper around AvailableNettyByteBody(ByteBuf) with an extra body length check.
    static io.micronaut.http.body.CloseableAvailableByteBody
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull io.micronaut.http.body.CloseableByteBody
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.netty.buffer.ByteBuf
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull io.micronaut.http.body.CloseableAvailableByteBody
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    byte @NonNull []
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static @NonNull io.netty.buffer.ByteBuf
    toByteBuf(@NonNull io.micronaut.http.body.AvailableByteBody body)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull io.micronaut.core.io.buffer.ByteBuffer<?>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull InputStream
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ReadBuffer>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull String
    toString(Charset charset)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class io.micronaut.http.body.InternalByteBody

    buffer, bufferFlow, failClaim, recordClosed, recordPrimaryOp, toByteArrayPublisher

    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.AvailableByteBody

    expectedLength, split, toByteArrayPublisher, toByteBufferPublisher, toReadBuffer

    Methods inherited from interface io.micronaut.http.body.ByteBody

    buffer

    Methods inherited from interface io.micronaut.http.body.CloseableAvailableByteBody

    allowDiscard
  • Constructor Details

    • AvailableNettyByteBody

      public AvailableNettyByteBody(@NonNull @NonNull io.netty.buffer.ByteBuf buffer)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • empty

      public static io.micronaut.http.body.CloseableAvailableByteBody empty()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toByteBuf

      @NonNull public static @NonNull io.netty.buffer.ByteBuf toByteBuf(@NonNull @NonNull io.micronaut.http.body.AvailableByteBody body)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • createChecked

      @NonNull public static @NonNull io.micronaut.http.body.CloseableByteBody createChecked(@NonNull @NonNull io.netty.channel.EventLoop loop, @NonNull @NonNull io.micronaut.http.body.stream.BodySizeLimits bodySizeLimits, @NonNull @NonNull io.netty.buffer.ByteBuf buf)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This is a wrapper around AvailableNettyByteBody(ByteBuf) with an extra body length check.
      Parameters:
      loop - The event loop for constructing StreamingNettyByteBody
      bodySizeLimits - The body size limits to check
      buf - The input buffer
      Returns:
      The body with the given input buffer, or a StreamingNettyByteBody with the appropriate content length error
    • peek

      public io.netty.buffer.ByteBuf peek()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toInputStream

      @NonNull public @NonNull InputStream toInputStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toInputStream in interface io.micronaut.http.body.AvailableByteBody
      Specified by:
      toInputStream in interface io.micronaut.http.body.ByteBody
    • length

      public long length()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      length in interface io.micronaut.http.body.AvailableByteBody
    • bufferFlow

      @NonNull public @NonNull io.micronaut.core.execution.ExecutionFlow<? extends io.micronaut.http.body.CloseableAvailableByteBody> bufferFlow()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      bufferFlow in class io.micronaut.http.body.InternalByteBody
    • close

      public void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface io.micronaut.http.body.CloseableByteBody
    • toReadBufferPublisher

      @NonNull public @NonNull org.reactivestreams.Publisher<io.micronaut.core.io.buffer.ReadBuffer> toReadBufferPublisher()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toReadBufferPublisher in interface io.micronaut.http.body.AvailableByteBody
      Specified by:
      toReadBufferPublisher in interface io.micronaut.http.body.ByteBody
      Specified by:
      toReadBufferPublisher in class io.micronaut.http.body.InternalByteBody
    • toByteArray

      public byte @NonNull [] toByteArray()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toByteArray in interface io.micronaut.http.body.AvailableByteBody
    • toByteBuffer

      @NonNull public @NonNull io.micronaut.core.io.buffer.ByteBuffer<?> toByteBuffer()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toByteBuffer in interface io.micronaut.http.body.AvailableByteBody
    • move

      @NonNull public @NonNull io.micronaut.http.body.CloseableByteBody move()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      move in interface io.micronaut.http.body.ByteBody
    • toString

      @NonNull public @NonNull String toString(Charset charset)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      toString in interface io.micronaut.http.body.AvailableByteBody
    • split

      @NonNull public @NonNull io.micronaut.http.body.CloseableAvailableByteBody split()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      split in interface io.micronaut.http.body.AvailableByteBody
      Specified by:
      split in interface io.micronaut.http.body.ByteBody
    • touch

      public void touch()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      touch in interface io.micronaut.http.body.ByteBody