org.apache.cocoon.mail.datasource
Class FilePartDataSource
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.mail.datasource.AbstractDataSource
org.apache.cocoon.mail.datasource.FilePartDataSource
- All Implemented Interfaces:
- DataSource, LogEnabled
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 1304258 2012-03-23 10:09:27Z ilgrosso $
- See Also:
DataSource
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePartDataSource
public FilePartDataSource(Part part)
- Creates a new instance of FilePartDataSource from an
Part
object.
- Parameters:
part
- An Part
object.
FilePartDataSource
public FilePartDataSource(Part part,
String type,
String name)
- Creates a new instance of FilePartDataSource from an
Part
object.
- Parameters:
part
- An Part
object.
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-2010 The Apache Software Foundation. All Rights Reserved.