Class NettyCompletedAttribute

java.lang.Object
io.micronaut.http.server.netty.multipart.NettyCompletedAttribute
All Implemented Interfaces:
CompletedPart, PartData

@Internal public class NettyCompletedAttribute extends Object implements CompletedPart
A delegation of the Netty Attribute to implement the CompletedPart contract.
Since:
1.3.0
Author:
James Kleeh
  • Constructor Details

    • NettyCompletedAttribute

      public NettyCompletedAttribute(io.netty.handler.codec.http.multipart.Attribute attribute)
      Parameters:
      attribute - The netty attribute
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface CompletedPart
      Returns:
      The name of the part
    • getInputStream

      public InputStream getInputStream() throws IOException
      Description copied from interface: PartData
      Gets the content of this chunk as an InputStream.
      Specified by:
      getInputStream in interface PartData
      Returns:
      The content of this chunk as an InputStream
      Throws:
      IOException - If an error occurs in retrieving the content
    • getBytes

      public byte[] getBytes() throws IOException
      Description copied from interface: PartData
      Gets the content of this chunk as a byte[].
      Specified by:
      getBytes in interface PartData
      Returns:
      The content of this chunk as a byte[]
      Throws:
      IOException - If an error occurs in retrieving the content
    • getByteBuffer

      public ByteBuffer getByteBuffer() throws IOException
      Description copied from interface: PartData
      Gets the content of this chunk as a ByteBuffer.
      Specified by:
      getByteBuffer in interface PartData
      Returns:
      The content of this chunk as a ByteBuffer
      Throws:
      IOException - If an error occurs in retrieving the content
    • getContentType

      public Optional<MediaType> getContentType()
      Description copied from interface: PartData
      Gets the content type of this chunk.
      Specified by:
      getContentType in interface PartData
      Returns:
      The content type of this chunk.