@Internal public class NettyCompletedFileUpload extends java.lang.Object implements 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 |
|---|---|
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<MediaType> |
getContentType()
Gets the content type of this part.
|
long |
getDefinedSize()
Returns the defined content length of the part.
|
java.lang.String |
getFilename()
Gets the name of this part.
|
java.io.InputStream |
getInputStream()
Gets the content of this part as a InputStream.
|
java.lang.String |
getName()
Gets the name of this part.
|
long |
getSize()
Returns the size of the part.
|
boolean |
isComplete()
Returns whether the
FileUpload has been fully uploaded or is in a partial state. |
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 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
public 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 PartDatajava.io.IOException - If an error occurs in retrieving the contentpublic java.util.Optional<MediaType> getContentType()
FileUploadgetContentType in interface FileUploadgetContentType in interface PartDatapublic java.lang.String getName()
FileUploadgetName in interface CompletedPartgetName in interface FileUploadpublic java.lang.String getFilename()
FileUploadgetFilename in interface FileUploadpublic long getSize()
FileUploadgetSize in interface FileUploadpublic long getDefinedSize()
FileUploadgetDefinedSize in interface FileUploadpublic boolean isComplete()
FileUploadFileUpload has been fully uploaded or is in a partial state.isComplete in interface FileUpload