objectivehtml.common
Interface UploadedFile

All Known Implementing Classes:
StrutsUploadedFile

public interface UploadedFile

This interface defines an uploaded file.


Method Summary
 void destroy()
          Destroy all content for this form file.
 java.lang.String getContentType()
          Get the content type for this file.
 java.lang.String getFileName()
          Get the file name of this file.
 int getFileSize()
          Get the size of this file
 java.io.InputStream getInputStream()
          Get an InputStream that represents this file.
 void setContentType(java.lang.String sContentType)
          Set the content type for this file
 void setFileName(java.lang.String sFileName)
          Set the filename of this file
 void setFileSize(int nFileSize)
          Set the file size
 

Method Detail

getContentType

public java.lang.String getContentType()
Get the content type for this file.
Returns:
A String representing content type

setContentType

public void setContentType(java.lang.String sContentType)
Set the content type for this file
Parameters:
sContentType - The content type

getFileSize

public int getFileSize()
Get the size of this file
Returns:
an int representing the size of the file in bytes

setFileSize

public void setFileSize(int nFileSize)
Set the file size
Parameters:
nFileSize - an int reprsenting the size of the file in bytes

getFileName

public java.lang.String getFileName()
Get the file name of this file.
Returns:
a String reprsenting a file name

setFileName

public void setFileName(java.lang.String sFileName)
Set the filename of this file
Parameters:
sFileName - the name of the file

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException
Get an InputStream that represents this file.
Throws:
java.io.FileNotFoundException - ff some sort of file representation cannot be found for the FormFile
java.io.IOException - ff there is some sort of IOException

destroy

public void destroy()
Destroy all content for this form file. Implementations should remove any temporary files or any temporary file data stored somewhere