EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tucana
Interface DownloadProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractDownloadProvider, FileDownloadProvider, InputStreamDownloadProvider

public interface DownloadProvider
extends Serializable

An interface to be implemented by the class providing the data to be downloaded.

Version:
$Id: DownloadProvider.java 185 2009-05-06 19:13:15Z sptrakesh $
Author:
Echo File Transfer Library

Method Summary
 String getContentDisposition()
          Returns the value of the disposition-type in the Content-Disposition parameter of the response header.
 String getContentType()
          Returns the content type, for example "text/plain".
 String getFileName()
          Returns the file name, for example "my-file.txt".
 long getSize()
          Returns the size of the data to be downloaded.
 Status getStatus()
          Return the status of the download action.
 void writeFile(OutputStream out)
          Writes the file data to the output stream.
 

Method Detail

getContentType

String getContentType()
Returns the content type, for example "text/plain".

Returns:
the content type.

getContentDisposition

String getContentDisposition()
Returns the value of the disposition-type in the Content-Disposition parameter of the response header. null indicates that a Content-Disposition parameter should not be included in the reponse header. See RFC 2183 for more info. The following values are most commonly used:

Returns:
The file's Content-Disposition

getFileName

String getFileName()
Returns the file name, for example "my-file.txt".

Returns:
the file name.

getSize

long getSize()
Returns the size of the data to be downloaded.

Returns:
the size of the data to be downloaded.

writeFile

void writeFile(OutputStream out)
               throws IOException
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.

getStatus

Status getStatus()
Return the status of the download action.

Returns:
A status indicator regarding progress of the download.

EchoPoint API - 3.0.0b5
App Webcontainer