Class NettyPartData
java.lang.Object
io.micronaut.http.server.netty.multipart.NettyPartData
- All Implemented Interfaces:
PartData
A Netty implementation of
PartData.- Since:
- 1.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorsConstructorDescriptionNettyPartData(Supplier<Optional<MediaType>> mediaTypeSupplier, Supplier<io.netty.buffer.ByteBuf> byteBufSupplier) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufThe contents of the chunk are released immediately.byte[]getBytes()The contents of the chunk are released immediately.Gets the content type of this chunk.The contents of the chunk will be released when the stream is closed.
-
Constructor Details
-
Method Details
-
getInputStream
The contents of the chunk will be released when the stream is closed.- Specified by:
getInputStreamin interfacePartData- Returns:
- The content of this chunk as an
InputStream - Throws:
IOException- If an error occurs in retrieving the content- See Also:
-
getBytes
The contents of the chunk are released immediately.- Specified by:
getBytesin interfacePartData- Returns:
- The content of this chunk as a
byte[] - Throws:
IOException- If an error occurs in retrieving the content- See Also:
-
getByteBuffer
The contents of the chunk are released immediately.- Specified by:
getByteBufferin interfacePartData- Returns:
- The content of this chunk as a
ByteBuffer - Throws:
IOException- If an error occurs in retrieving the content- See Also:
-
getContentType
Description copied from interface:PartDataGets the content type of this chunk.- Specified by:
getContentTypein interfacePartData- Returns:
- The content type of this chunk.
- See Also:
-
getByteBuf
public io.netty.buffer.ByteBuf getByteBuf()- Returns:
- The native netty
ByteBuffor this chunk
-