public class CommonsMultipartFileParameter extends FileParameter
Created: 2008. 04. 11 PM 8:55:25
savedFile| Constructor | Description |
|---|---|
CommonsMultipartFileParameter(org.apache.commons.fileupload.FileItem fileItem) |
Create an instance wrapping the given FileItem.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
delete() |
Deletes the underlying Commons FileItem instances.
|
byte[] |
getBytes() |
Return an byte array to read the contents of the file from.
|
java.lang.String |
getContentType() |
Gets the content type of the data being uploaded.
|
java.io.File |
getFile() |
|
java.lang.String |
getFileName() |
Returns the file name that was uploaded in the multipart form.
|
long |
getFileSize() |
Returns the file size that was uploaded in the multipart form.
|
java.io.InputStream |
getInputStream() |
Return an InputStream to read the contents of the file from.
|
java.lang.String |
getStorageDescription() |
Return a description for the storage location of the multipart content.
|
void |
release() |
Sets the access permission that allow write operations on the file associated with this FileParameter.
|
java.io.File |
saveAs(java.io.File destFile,
boolean overwrite) |
Save an uploaded file as a given destination file.
|
getSavedFile, isRefused, rollback, saveAs, setRefused, toStringpublic CommonsMultipartFileParameter(org.apache.commons.fileupload.FileItem fileItem)
fileItem - the FileItem to wrappublic java.io.File getFile()
getFile in class FileParameterpublic java.lang.String getContentType()
getContentType in class FileParameterpublic java.lang.String getFileName()
getFileName in class FileParameterpublic long getFileSize()
getFileSize in class FileParameterpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in class FileParameterjava.io.IOException - in case of access errors (if the temporary store fails)public byte[] getBytes()
getBytes in class FileParameterpublic java.io.File saveAs(java.io.File destFile,
boolean overwrite)
throws java.io.IOException
saveAs in class FileParameterdestFile - the destination fileoverwrite - whether to overwrite if it already existsjava.io.IOException - if an I/O error has occurredpublic void delete()
delete in class FileParameterpublic void release()
FileParameterrelease in class FileParameterpublic java.lang.String getStorageDescription()
Copyright © 2008–2018 The Aspectran Project. All rights reserved.