Package io.micronaut.http.multipart
Interface PartData
-
- All Known Subinterfaces:
CompletedFileUpload,CompletedPart
public interface PartDataRepresents 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.ByteBuffergetByteBuffer()Gets the content of this chunk as aByteBuffer.byte[]getBytes()Gets the content of this chunk as abyte[].java.util.Optional<MediaType>getContentType()Gets the content type of this chunk.java.io.InputStreamgetInputStream()Gets the content of this chunk as anInputStream.
-
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionGets the content of this chunk as anInputStream.- 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.IOExceptionGets the content of this chunk as abyte[].- 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.IOExceptionGets the content of this chunk as aByteBuffer.- 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.
-
-