public class CommonsUploadedFile extends Object implements UploadedFile, Serializable
Constructor and Description |
---|
CommonsUploadedFile() |
CommonsUploadedFile(org.apache.commons.fileupload.FileItem fileItem,
Long sizeLimit) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent() |
String |
getContentType() |
String |
getFileName() |
InputStream |
getInputStream() |
long |
getSize() |
void |
write(String filePath)
Writes the uploaded file to the given file path.
|
public CommonsUploadedFile()
public CommonsUploadedFile(org.apache.commons.fileupload.FileItem fileItem, Long sizeLimit)
public String getFileName()
getFileName
in interface UploadedFile
public InputStream getInputStream() throws IOException
getInputStream
in interface UploadedFile
IOException
public long getSize()
getSize
in interface UploadedFile
public byte[] getContent()
getContent
in interface UploadedFile
public String getContentType()
getContentType
in interface UploadedFile
public void write(String filePath) throws Exception
UploadedFile
write
in interface UploadedFile
filePath
- The target file path.Exception
- If something went wrong.Copyright © 2020. All rights reserved.