org.apache.tapestry.request
Interface IUploadFile

All Known Implementing Classes:
UploadPart

public interface IUploadFile

Represents a file uploaded from a client side form.

Since:
1.0.8
Version:
$Id: IUploadFile.java,v 1.2 2003/03/23 16:12:39 hlship Exp $
Author:
Howard Lewis Ship

Method Summary
 String getContentType()
          Returns the MIME type specified when the file was uploaded.
 String getFileName()
          Returns the name of the file that was uploaded.
 String getFilePath()
          Returns the complete path, as reported by the client browser.
 InputStream getStream()
          Returns an input stream of the content of the file.
 

Method Detail

getFileName

public String getFileName()
Returns the name of the file that was uploaded. This is just the filename portion of the complete path.

getFilePath

public String getFilePath()
Returns the complete path, as reported by the client browser. Different browsers report different things here.
Since:
2.0.4

getStream

public InputStream getStream()
Returns an input stream of the content of the file. There is no guarantee that this stream will be valid after the end of the current request cycle, so it should be processed immediately.

As of release 1.0.8, this will be a a java.io.ByteArrayInputStream, but that, too, may change (a future implementation may upload the stream to a temporary file and return an input stream from that).


getContentType

public String getContentType()
Returns the MIME type specified when the file was uploaded. May return null if the content type is not known.
Since:
2.2