org.cert.cc.util
Class InputStreamDataSource

java.lang.Object
  extended by org.cert.cc.util.InputStreamDataSource
All Implemented Interfaces:
Closeable, DataSource

public final class InputStreamDataSource
extends Object
implements DataSource, Closeable

InputStreamDataSource allows any InputStream to serve as the input for a DataSource.

© 2009 Carnegie Mellon University

Author:
Steve Scholnick

Constructor Summary
InputStreamDataSource(InputStream inputStream)
          Constructor
 
Method Summary
 void close()
          
 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

InputStreamDataSource

public InputStreamDataSource(InputStream inputStream)
Constructor

Parameters:
inputStream - Source InputStream
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

close

public void close()
           throws IOException

Specified by:
close in interface Closeable
Throws:
IOException


Copyright © 2012 Carnegie Mellon University