org.apache.commons.httpclient.methods.multipart
public class FilePartSource extends Object implements PartSource
Since: 2.0
| Constructor Summary | |
|---|---|
| FilePartSource(File file)
Constructor for FilePartSource.
| |
| FilePartSource(String fileName, File file)
Constructor for FilePartSource.
| |
| Method Summary | |
|---|---|
| InputStream | createInputStream()
Return a new FileInputStream for the current filename. |
| String | getFileName()
Return the current filename |
| long | getLength()
Return the length of the file |
Parameters: file the FilePart source File.
Throws: FileNotFoundException if the file does not exist or cannot be read
Parameters: fileName the file name of the FilePart file the source File for the FilePart
Throws: FileNotFoundException if the file does not exist or cannot be read
Returns: the new input stream.
Throws: IOException If an IO problem occurs.
See Also: createInputStream
Returns: the filename.
See Also: getFileName
Returns: the length of the file.
See Also: getLength