org.apache.cocoon.mail.datasource
Class FilePartDataSource

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.mail.datasource.AbstractDataSource
          extended byorg.apache.cocoon.mail.datasource.FilePartDataSource
All Implemented Interfaces:
DataSource

public class FilePartDataSource
extends AbstractDataSource

The FilePartDataSource class provides an object, that wraps a Cocoon Part object in a DataSource interface.

Version:
$Id: FilePartDataSource.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
DataSource

Constructor Summary
FilePartDataSource(org.apache.cocoon.servlet.multipart.Part part)
          Creates a new instance of FilePartDataSource from an Part object.
FilePartDataSource(org.apache.cocoon.servlet.multipart.Part part, String type, String name)
          Creates a new instance of FilePartDataSource from an Part object.
 
Method Summary
 InputStream getInputStream()
          The InputStream object obtained from Part.getInputStream() object.
 
Methods inherited from class org.apache.cocoon.mail.datasource.AbstractDataSource
getContentType, getName, getOutputStream, isNullOrEmpty, setContentType, setName
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePartDataSource

public FilePartDataSource(org.apache.cocoon.servlet.multipart.Part part)
Creates a new instance of FilePartDataSource from an Part object.

Parameters:
part - An Part object.

FilePartDataSource

public FilePartDataSource(org.apache.cocoon.servlet.multipart.Part part,
                          String type,
                          String name)
Creates a new instance of FilePartDataSource from an Part object.

Parameters:
part - An Part object.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
The InputStream object obtained from Part.getInputStream() object.

Specified by:
getInputStream in interface DataSource
Specified by:
getInputStream in class AbstractDataSource
Returns:
The InputStream object for this DataSource object.
Throws:
IOException - if an I/O error occurs.


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.