EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tucana
Class InputStreamDownloadProvider

java.lang.Object
  extended by echopoint.tucana.AbstractDownloadProvider
      extended by echopoint.tucana.InputStreamDownloadProvider
All Implemented Interfaces:
DownloadProvider, Serializable

public class InputStreamDownloadProvider
extends AbstractDownloadProvider

A download provider implementation that streams the contents of the specified input stream to the client request output stream on demand.

Version:
$Id: InputStreamDownloadProvider.java 255 2009-11-29 12:16:16Z sptrakesh $
Author:
Rakesh 2009-08-21
See Also:
Serialized Form

Field Summary
 
Fields inherited from class echopoint.tucana.AbstractDownloadProvider
contentDisposition, contentType, fileName, size, status
 
Constructor Summary
InputStreamDownloadProvider(InputStream stream)
          Create a new download provider instance for the specified input stream.
 
Method Summary
 String getContentType()
          Returns the content type, for example "text/plain".
 String getFileName()
          Returns the file name, for example "my-file.txt".
 void writeFile(OutputStream out)
          Writes the file data to the output stream.
 
Methods inherited from class echopoint.tucana.AbstractDownloadProvider
getContentDisposition, getSize, getStatus, setContentType, setFileName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamDownloadProvider

public InputStreamDownloadProvider(InputStream stream)
Create a new download provider instance for the specified input stream.

Parameters:
stream - The input stream from which to stream the output.
Method Detail

getContentType

public String getContentType()
Description copied from interface: DownloadProvider
Returns the content type, for example "text/plain".

Returns:
the content type.

writeFile

public void writeFile(OutputStream out)
               throws IOException
Description copied from interface: DownloadProvider
Writes the file data to the output stream.

Parameters:
out - the output stream to which the file data must be written.
Throws:
IOException - If errors are encountered while writing to the output stream.

getFileName

public String getFileName()
Description copied from class: AbstractDownloadProvider
Returns the file name, for example "my-file.txt".

Specified by:
getFileName in interface DownloadProvider
Overrides:
getFileName in class AbstractDownloadProvider
Returns:
the file name.

EchoPoint API - 3.0.0b5
App Webcontainer