railo.commons.net.http.httpclient3
Class ResourcePartSource

java.lang.Object
  extended by 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


Constructor Summary
ResourcePartSource(Resource res)
          Constructor of the class
ResourcePartSource(String fileName, Resource file)
          Constructor for FilePartSource.
 
Method Summary
 InputStream createInputStream()
           
 String getFileName()
           
 long getLength()
           
 Resource getResource()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 FilePart
file - the source File for the FilePart
Throws:
FileNotFoundException - if the file does not exist or cannot be read
Method Detail

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