org.apache.struts.upload
public interface FormFile
Method Summary | |
---|---|
void | destroy()
Destroys all content for the uploaded file, including any underlying
data files. |
String | getContentType()
Returns the content type for this file.
|
byte[] | getFileData()
Returns the data for the entire file as byte array. |
String | getFileName()
Returns the file name of this file. |
int | getFileSize()
Returns the size of this file.
|
InputStream | getInputStream()
Returns an input stream for this file. |
void | setContentType(String contentType)
Sets the content type for this file.
|
void | setFileName(String fileName)
Sets the file name of this file.
|
void | setFileSize(int fileSize)
Sets the file size.
|
Returns: A String representing content type.
getInputStream
.
Returns: The file data as a byte array.
Throws: FileNotFoundException if the uploaded file is not found. IOException if an error occurred while reading the file.
Returns: The base file name.
Returns: The size of the file, in bytes.
Throws: FileNotFoundException if the uploaded file is not found. IOException if an error occurred while reading the file.
Parameters: contentType The content type for the file.
Parameters: fileName The base file name.
Parameters: fileSize The size of the file, in bytes,