public class CustomFilePartSource
extends java.lang.Object
implements org.apache.commons.httpclient.methods.multipart.PartSource
Modifier and Type | Field and Description |
---|---|
static boolean |
FULLNAME |
Constructor and Description |
---|
CustomFilePartSource(java.io.File file,
java.util.List listeners)
Constructor for CustomFilePartSource.
|
CustomFilePartSource(java.io.File file,
java.util.List listeners,
java.lang.String altfilename)
Constructor for CustomFilePartSource.
|
CustomFilePartSource(java.io.File file,
java.util.List listeners,
java.lang.String altfilename,
long resumeoffset)
Constructor for CustomFilePartSource.
|
CustomFilePartSource(java.io.File file,
java.util.List listeners,
java.lang.String altfilename,
long resumeoffset,
long maxlength,
Conf cnf)
Constructor for CustomFilePartSource.
|
CustomFilePartSource(java.io.File file,
java.util.List listeners,
java.lang.String altfilename,
long resumeoffset,
long maxlength,
Conf cnf,
boolean forceNotification)
Constructor for CustomFilePartSource.
|
CustomFilePartSource(java.lang.String fileName,
java.io.File file)
Constructor for FilePartSource.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.InputStream |
createInputStream()
Return a new
InputStream for the current filename. |
java.lang.String |
getFileName()
Return the current filename
|
long |
getLength()
Return the length of the file
|
public CustomFilePartSource(java.io.File file, java.util.List listeners, java.lang.String altfilename, long resumeoffset, long maxlength, Conf cnf, boolean forceNotification) throws java.io.FileNotFoundException
file
- listeners
- altfilename
- resumeoffset
- maxlength
- cnf
- forceNotification
- java.io.FileNotFoundException
public CustomFilePartSource(java.io.File file, java.util.List listeners, java.lang.String altfilename, long resumeoffset, long maxlength, Conf cnf) throws java.io.FileNotFoundException
file
- file to uploadlisteners
- listeners to be notifiedaltfilename
- alternative filenameresumeoffset
- resume offsetmaxlength
- maximum lengthconf
- java.io.FileNotFoundException
public CustomFilePartSource(java.io.File file, java.util.List listeners, java.lang.String altfilename, long resumeoffset) throws java.io.FileNotFoundException
file
- file to uploadlisteners
- listeners to be notifiedaltfilename
- alternative filenameresumeoffset
- resume offsetjava.io.FileNotFoundException
public CustomFilePartSource(java.io.File file, java.util.List listeners, java.lang.String altfilename) throws java.io.FileNotFoundException
file
- listeners
- altfilename
- alternative filenamejava.io.FileNotFoundException
public CustomFilePartSource(java.io.File file, java.util.List listeners) throws java.io.FileNotFoundException
file
- listeners
- java.io.FileNotFoundException
public CustomFilePartSource(java.lang.String fileName, java.io.File file) throws java.io.FileNotFoundException
fileName
- the file name of the FilePartfile
- the source File for the FilePartjava.io.FileNotFoundException
- if the file does not exist or
cannot be readpublic long getLength()
getLength
in interface org.apache.commons.httpclient.methods.multipart.PartSource
PartSource.getLength()
public java.lang.String getFileName()
getFileName
in interface org.apache.commons.httpclient.methods.multipart.PartSource
PartSource.getFileName()
public java.io.InputStream createInputStream() throws java.io.IOException
InputStream
for the current filename.createInputStream
in interface org.apache.commons.httpclient.methods.multipart.PartSource
java.io.IOException
- If an IO problem occurs.PartSource.createInputStream()
public void close() throws java.io.IOException
java.io.IOException