org.apache.commons.httpclient.methods.multipart
Class FilePartSource
java.lang.Object
org.apache.commons.httpclient.methods.multipart.FilePartSource
- PartSource
public class FilePartSource
extends java.lang.Object
A PartSource that reads from a File.
FilePartSource
public FilePartSource(File file)
throws FileNotFoundException
Constructor for FilePartSource.
file
- the FilePart source File.
FilePartSource
public FilePartSource(String fileName,
File file)
throws FileNotFoundException
Constructor for FilePartSource.
fileName
- the file name of the FilePartfile
- the source File for the FilePart
createInputStream
public InputStream createInputStream()
throws IOException
Return a new FileInputStream
for the current filename.
- createInputStream in interface PartSource
getLength
public long getLength()
Return the length of the file
- getLength in interface PartSource
Copyright (c) 1999-2005 - Apache Software Foundation