org.apache.struts.upload
public interface FormFile
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys all content for the uploaded file, including any underlying
data files.
|
java.lang.String |
getContentType()
Returns the content type for this file.
|
byte[] |
getFileData()
Returns the data for the entire file as byte array.
|
java.lang.String |
getFileName()
Returns the file name of this file.
|
int |
getFileSize()
Returns the size of this file.
|
java.io.InputStream |
getInputStream()
Returns an input stream for this file.
|
void |
setContentType(java.lang.String contentType)
Sets the content type for this file.
|
void |
setFileName(java.lang.String fileName)
Sets the file name of this file.
|
void |
setFileSize(int fileSize)
Sets the file size.
|
java.lang.String getContentType()
void setContentType(java.lang.String contentType)
contentType
- The content type for the file.int getFileSize()
void setFileSize(int fileSize)
fileSize
- The size of the file, in bytes,java.lang.String getFileName()
void setFileName(java.lang.String fileName)
fileName
- The base file name.byte[] getFileData() throws java.io.FileNotFoundException, java.io.IOException
getInputStream
.java.io.FileNotFoundException
- if the uploaded file is not found.java.io.IOException
- if an error occurred while reading the
file.java.io.InputStream getInputStream() throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
- if the uploaded file is not found.java.io.IOException
- if an error occurred while reading the
file.void destroy()
Copyright ? 2000-2014 - The Apache Software Foundation