|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.methods.multipart.FilePartSource
A PartSource that reads from a File.
Constructor Summary | |
FilePartSource(java.io.File file)
Constructor for FilePartSource. |
|
FilePartSource(java.lang.String fileName,
java.io.File file)
Constructor for FilePartSource. |
Method Summary | |
java.io.InputStream |
createInputStream()
Gets a new InputStream for reading this source. |
java.lang.String |
getFileName()
Gets the name of the file this source represents. |
long |
getLength()
Gets the number of bytes contained in this source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilePartSource(java.io.File file) throws java.io.FileNotFoundException
file
- the FilePart source File.
java.io.FileNotFoundException
- if the file does not exist or
cannot be readpublic FilePartSource(java.lang.String fileName, java.io.File file) throws java.io.FileNotFoundException
fileName
- the file name of the FilePartfile
- the source File for the FilePart
java.io.FileNotFoundException
- if the file does not exist or
cannot be readMethod Detail |
public long getLength()
PartSource
getLength
in interface PartSource
PartSource.getLength()
public java.lang.String getFileName()
PartSource
getFileName
in interface PartSource
PartSource.getFileName()
public java.io.InputStream createInputStream() throws java.io.IOException
PartSource
createInputStream
in interface PartSource
java.io.IOException
- if an error occurs when creating the InputStreamPartSource.createInputStream()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |