org.apache.cocoon.mail.datasource
Class SourceDataSource

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

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 1304280 2012-03-23 11:18:01Z 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.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

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-2008 The Apache Software Foundation. All Rights Reserved.