|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.multipart.FilePartSource
public class FilePartSource
This class is an adaptation of the Apache HttpClient implementation
| 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 FileInputStream for the current filename. |
java.io.File |
getFile()
|
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 |
| 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 read
public 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 read| Method Detail |
|---|
public long getLength()
getLength in interface PartSourcePartSource.getLength()public java.lang.String getFileName()
getFileName in interface PartSourcePartSource.getFileName()
public java.io.InputStream createInputStream()
throws java.io.IOException
FileInputStream for the current filename.
createInputStream in interface PartSourcejava.io.IOException - If an IO problem occurs.PartSource.createInputStream()public java.io.File getFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||