railo.commons.net.http.httpclient3
Class ResourcePartSource
java.lang.Object
railo.commons.net.http.httpclient3.ResourcePartSource
- All Implemented Interfaces:
- org.apache.commons.httpclient.methods.multipart.PartSource
public final class ResourcePartSource
- extends Object
- implements org.apache.commons.httpclient.methods.multipart.PartSource
ResourcePartSource
public ResourcePartSource(Resource res)
throws FileNotFoundException
- Constructor of the class
- Parameters:
res
- the FilePart source File.
- Throws:
FileNotFoundException
- if the file does not exist or
cannot be read
ResourcePartSource
public ResourcePartSource(String fileName,
Resource file)
throws FileNotFoundException
- Constructor for FilePartSource.
- Parameters:
fileName
- the file name of the FilePartfile
- the source File for the FilePart
- Throws:
FileNotFoundException
- if the file does not exist or
cannot be read
getLength
public long getLength()
- Specified by:
getLength
in interface org.apache.commons.httpclient.methods.multipart.PartSource
getFileName
public String getFileName()
- Specified by:
getFileName
in interface org.apache.commons.httpclient.methods.multipart.PartSource
createInputStream
public InputStream createInputStream()
throws IOException
- Specified by:
createInputStream
in interface org.apache.commons.httpclient.methods.multipart.PartSource
- Throws:
IOException
getResource
public Resource getResource()
- Returns:
- the res
Copyright © 2012 Railo