java.lang.Object |
↳ |
com.ning.http.multipart.FilePartSource |
Class Overview
This class is an adaptation of the Apache HttpClient implementationhttp://hc.apache.org/httpclient-3.x/
Summary
Public Constructors |
|
FilePartSource(File file)
Constructor for FilePartSource.
|
|
FilePartSource(String fileName, File file)
Constructor for FilePartSource.
|
Public Methods |
InputStream
|
createInputStream()
Return a new java.io.FileInputStream for the current filename.
|
File
|
getFile()
|
String
|
getFileName()
Return the current filename
|
long
|
getLength()
Return the length of the file
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
com.ning.http.multipart.PartSource
abstract
InputStream
|
createInputStream()
Gets a new InputStream for reading this source.
|
abstract
String
|
getFileName()
Gets the name of the file this source represents.
|
abstract
long
|
getLength()
Gets the number of bytes contained in this source.
|
|
Public Constructors
public
FilePartSource
(File file)
Constructor for FilePartSource.
Parameters
file
| the FilePart source File. |
Throws
FileNotFoundException
| if the file does not exist or
cannot be read
|
public
FilePartSource
(String fileName, File file)
Constructor for FilePartSource.
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
|
Public Methods
public
InputStream
createInputStream
()
Return a new java.io.FileInputStream for the current filename.
Throws
IOException
| If an IO problem occurs. |
public
String
getFileName
()
Return the current filename
public
long
getLength
()
Return the length of the file