@Internal
public class NettyCompletedFileUpload
extends java.lang.Object
implements io.micronaut.http.multipart.CompletedFileUpload
CompletedFileUpload.| Constructor and Description |
|---|
NettyCompletedFileUpload(io.netty.handler.codec.http.multipart.FileUpload fileUpload) |
NettyCompletedFileUpload(io.netty.handler.codec.http.multipart.FileUpload fileUpload,
boolean controlRelease) |
| Modifier and Type | Method and Description |
|---|---|
void |
discard() |
java.nio.ByteBuffer |
getByteBuffer()
Gets the content of this part as a ByteBuffer.
|
byte[] |
getBytes()
Gets the content of this part as a byte[].
|
java.util.Optional<io.micronaut.http.MediaType> |
getContentType() |
long |
getDefinedSize() |
java.lang.String |
getFilename() |
java.io.InputStream |
getInputStream()
Gets the content of this part as a InputStream.
|
java.lang.String |
getName() |
long |
getSize() |
boolean |
isComplete() |
public NettyCompletedFileUpload(io.netty.handler.codec.http.multipart.FileUpload fileUpload)
fileUpload - The file uploadpublic NettyCompletedFileUpload(io.netty.handler.codec.http.multipart.FileUpload fileUpload,
boolean controlRelease)
fileUpload - The file uploadcontrolRelease - If true, release after retrieving the datapublic java.io.InputStream getInputStream()
throws java.io.IOException
The contents of the file will be released when the stream is closed. This method should only be called once
getInputStream in interface io.micronaut.http.multipart.PartDatajava.io.IOException - If an error occurs in retrieving the contentpublic byte[] getBytes()
throws java.io.IOException
Because the contents of the file are released after being retrieved, this method can only be called once
getBytes in interface io.micronaut.http.multipart.PartDatajava.io.IOException - If an error occurs in retrieving the contentpublic java.nio.ByteBuffer getByteBuffer()
throws java.io.IOException
Because the contents of the file are released after being retrieved, this method can only be called once
getByteBuffer in interface io.micronaut.http.multipart.PartDatajava.io.IOException - If an error occurs in retrieving the contentpublic java.util.Optional<io.micronaut.http.MediaType> getContentType()
getContentType in interface io.micronaut.http.multipart.FileUploadgetContentType in interface io.micronaut.http.multipart.PartDatapublic java.lang.String getName()
getName in interface io.micronaut.http.multipart.CompletedPartgetName in interface io.micronaut.http.multipart.FileUploadpublic java.lang.String getFilename()
getFilename in interface io.micronaut.http.multipart.FileUploadpublic long getSize()
getSize in interface io.micronaut.http.multipart.FileUploadpublic long getDefinedSize()
getDefinedSize in interface io.micronaut.http.multipart.FileUploadpublic boolean isComplete()
isComplete in interface io.micronaut.http.multipart.FileUploadpublic void discard()
discard in interface io.micronaut.http.multipart.FileUpload