Package io.micronaut.http.multipart
Interface PartData
-
- All Known Subinterfaces:
CompletedFileUpload
,CompletedPart
public interface PartData
Represents a chunk of data belonging to a part of a multipart request.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.nio.ByteBuffer
getByteBuffer()
Gets the content of this chunk as a ByteBuffer.byte[]
getBytes()
Gets the content of this chunk as a byte[].java.util.Optional<MediaType>
getContentType()
Gets the content type of this chunk.java.io.InputStream
getInputStream()
Gets the content of this chunk as an InputStream.
-
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
Gets the content of this chunk as an InputStream.- Returns:
- The content of this chunk as an InputStream
- Throws:
java.io.IOException
- If an error occurs in retrieving the content
-
getBytes
byte[] getBytes() throws java.io.IOException
Gets the content of this chunk as a byte[].- Returns:
- The content of this chunk as a byte[]
- Throws:
java.io.IOException
- If an error occurs in retrieving the content
-
getByteBuffer
java.nio.ByteBuffer getByteBuffer() throws java.io.IOException
Gets the content of this chunk as a ByteBuffer.- Returns:
- The content of this chunk as a ByteBuffer
- Throws:
java.io.IOException
- If an error occurs in retrieving the content
-
getContentType
java.util.Optional<MediaType> getContentType()
Gets the content type of this chunk.- Returns:
- The content type of this chunk.
-
-