org.apache.cocoon.mail.datasource
Class SourceDataSource

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.mail.datasource.AbstractDataSource
          extended by org.apache.cocoon.mail.datasource.SourceDataSource
All Implemented Interfaces:
DataSource, LogEnabled

public class SourceDataSource
extends AbstractDataSource

The SourceDataSource class provides an object, that wraps a Cocoon org.apache.excalibur.source.Source object in a DataSource interface.

Version:
$Id: SourceDataSource.html 1304258 2012-03-23 10:09:27Z ilgrosso $
See Also:
Source, DataSource

Constructor Summary
SourceDataSource(Source src)
          Creates a new instance of SourceDataSource.
SourceDataSource(Source src, String type, String name)
          Creates a new instance of SourceDataSource.
 
Method Summary
 InputStream getInputStream()
          Get the InputStream object from the Source object.
 
Methods inherited from class org.apache.cocoon.mail.datasource.AbstractDataSource
getContentType, getName, getOutputStream, isNullOrEmpty, setContentType, setName
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceDataSource

public SourceDataSource(Source src)
Creates a new instance of SourceDataSource.

Parameters:
src - A org.apache.excalibur.source.Source Object.

SourceDataSource

public SourceDataSource(Source src,
                        String type,
                        String name)
Creates a new instance of SourceDataSource.

Parameters:
src - A org.apache.excalibur.source.Source Object.
Method Detail

getInputStream

public InputStream getInputStream()
                           throws IOException
Get the InputStream object from the Source object.

Specified by:
getInputStream in interface DataSource
Specified by:
getInputStream in class AbstractDataSource
Returns:
The InputStream object from the Source object.
Throws:
IOException - if an I/O error occurs.
See Also:
Source.getInputStream()


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