public class UploadPart extends java.lang.Object implements IUploadFile
| Constructor and Description |
|---|
UploadPart(org.apache.commons.fileupload.FileItem fileItem) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Deletes the external content file, if one exists.
|
java.lang.String |
getContentType()
Returns the MIME type specified when the file was uploaded.
|
java.lang.String |
getFileName()
Leverages
Fileto convert the full file path and extract the name. |
java.lang.String |
getFilePath()
Returns the complete path, as reported by the client
browser.
|
long |
getSize()
Returns the size, in bytes, of the uploaded content.
|
java.io.InputStream |
getStream()
Returns an input stream of the content of the file.
|
boolean |
isInMemory()
Returns true if the uploaded content is in memory.
|
void |
write(java.io.File file)
Writes the uploaded content to a file.
|
public UploadPart(org.apache.commons.fileupload.FileItem fileItem)
public java.lang.String getContentType()
IUploadFilegetContentType in interface IUploadFilepublic java.lang.String getFileName()
Fileto convert the full file path and extract the name.getFileName in interface IUploadFilepublic java.lang.String getFilePath()
IUploadFilegetFilePath in interface IUploadFilepublic java.io.InputStream getStream()
IUploadFileAs of release 1.0.8, this will be a a ByteArrayInputStream,
but that, too, may change (a future implementation may upload the stream
to a temporary file and return an input stream from that).
getStream in interface IUploadFilepublic void cleanup()
public void write(java.io.File file)
write in interface IUploadFilepublic long getSize()
IUploadFilegetSize in interface IUploadFilepublic boolean isInMemory()
IUploadFileisInMemory in interface IUploadFile