|
|||||||||
| Home >> All >> org >> apache >> commons >> httpclient >> methods >> [ multipart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.commons.httpclient.methods.multipart
Class FilePartSource

java.lang.Objectorg.apache.commons.httpclient.methods.multipart.FilePartSource
- All Implemented Interfaces:
- PartSource
- public class FilePartSource
- extends java.lang.Object
- implements PartSource
- extends java.lang.Object
A PartSource that reads from a File.
- Since:
- 2.0
| Field Summary | |
private java.io.File |
file
File part file. |
private java.lang.String |
fileName
File part file name. |
| 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()
Return a new java.io.FileInputStream for the current filename. |
java.lang.String |
getFileName()
Return the current filename |
long |
getLength()
Return the length of the file |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
file
private java.io.File file
- File part file.
fileName
private java.lang.String fileName
- File part file name.
| Constructor Detail |
FilePartSource
public FilePartSource(java.io.File file) throws java.io.FileNotFoundException
- Constructor for FilePartSource.
FilePartSource
public FilePartSource(java.lang.String fileName, java.io.File file) throws java.io.FileNotFoundException
- Constructor for FilePartSource.
| Method Detail |
getLength
public long getLength()
- Return the length of the file
- Specified by:
getLengthin interfacePartSource
getFileName
public java.lang.String getFileName()
- Return the current filename
- Specified by:
getFileNamein interfacePartSource
createInputStream
public java.io.InputStream createInputStream() throws java.io.IOException
- Return a new java.io.FileInputStream for the current filename.
- Specified by:
createInputStreamin interfacePartSource
|
|||||||||
| Home >> All >> org >> apache >> commons >> httpclient >> methods >> [ multipart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.commons.httpclient.methods.multipart.FilePartSource