org.foray.common.io
Class SimpleDataSource

java.lang.Object
  extended by org.foray.common.io.SimpleDataSource
All Implemented Interfaces:
DataSource

public class SimpleDataSource
extends Object
implements DataSource

Basic generic implementation of a data source.


Constructor Summary
SimpleDataSource(String contentType, InputStream inputStream, String name, OutputStream outputStream)
          Constructor.
 
Method Summary
 String getContentType()
           
 InputStream getInputStream()
           
 String getName()
           
 OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleDataSource

public SimpleDataSource(String contentType,
                        InputStream inputStream,
                        String name,
                        OutputStream outputStream)
Constructor.

Parameters:
contentType - The content type of this data source.
inputStream - The input stream for this data source.
name - The name of this data source.
outputStream - The output stream for this data source.
Method Detail

getContentType

public String getContentType()
Specified by:
getContentType in interface DataSource

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface DataSource
Throws:
IOException

getName

public String getName()
Specified by:
getName in interface DataSource

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Specified by:
getOutputStream in interface DataSource
Throws:
IOException


Copyright © 2017. All rights reserved.