| org.apache.struts.upload.FormFile
FormFile | public interface FormFile (Code) | | This interface represents a file that has been uploaded by a client. It
is the only interface or class in upload package which is typically
referenced directly by a Struts application.
|
destroy | public void destroy()(Code) | | Destroys all content for the uploaded file, including any
underlying data files.
|
getContentType | public String getContentType()(Code) | | Returns the content type for this file.
A String representing content type. |
getFileData | public byte[] getFileData() throws FileNotFoundException, IOException(Code) | | Returns the data for the entire file as byte array. Care is needed
when using this method, since a large upload could easily exhaust
available memory. The preferred method for accessing the file data is
FormFile.getInputStream() getInputStream .
The file data as a byte array. throws: FileNotFoundException - if the uploaded file is not found. throws: IOException - if an error occurred while reading thefile. |
getFileName | public String getFileName()(Code) | | Returns the file name of this file. This is the base name of the
file, as supplied by the user when the file was uploaded.
The base file name. |
getFileSize | public int getFileSize()(Code) | | Returns the size of this file.
The size of the file, in bytes. |
setContentType | public void setContentType(String contentType)(Code) | | Sets the content type for this file.
Parameters: contentType - The content type for the file. |
setFileName | public void setFileName(String fileName)(Code) | | Sets the file name of this file.
Parameters: fileName - The base file name. |
setFileSize | public void setFileSize(int fileSize)(Code) | | Sets the file size.
Parameters: fileSize - The size of the file, in bytes, |
|
|