com.nutiteq.net
Interface DownloadStreamOpener

All Known Implementing Classes:
DefaultDownloadStreamOpener

public interface DownloadStreamOpener

Interface for opening stream to downloaded resource. Library implementation assumes, that stream closing will be handled by stream opener class.


Field Summary
static int NETWORK_ERROR
          Error code for network error
static int RESPONCE_NOT_OK
          Error code for response with other responce code then 200.
static int SECURITY_EXCEPTION
          Error code for security exception, when network connection was opened.
static int TOO_MANY_REDIRECTS
          Maximum number of HTTP redirects has been reached.
 
Method Summary
 long getTimeout()
           
 void openInputStream(DownloadStreamWaiter streamWaiter, DataPostingDownloadable postingDownloadable)
           
 void openInputStream(DownloadStreamWaiter streamWaiter, java.lang.String url)
          Open a connection to given network resource and pass opened stream to streamWaiter.
 

Field Detail

NETWORK_ERROR

static final int NETWORK_ERROR
Error code for network error

See Also:
Constant Field Values

RESPONCE_NOT_OK

static final int RESPONCE_NOT_OK
Error code for response with other responce code then 200.

See Also:
Constant Field Values

SECURITY_EXCEPTION

static final int SECURITY_EXCEPTION
Error code for security exception, when network connection was opened.

See Also:
Constant Field Values

TOO_MANY_REDIRECTS

static final int TOO_MANY_REDIRECTS
Maximum number of HTTP redirects has been reached.

See Also:
Constant Field Values
Method Detail

openInputStream

void openInputStream(DownloadStreamWaiter streamWaiter,
                     java.lang.String url)
Open a connection to given network resource and pass opened stream to streamWaiter.

Parameters:
streamWaiter - object asking for stream to be opened
url - URL to network resource

openInputStream

void openInputStream(DownloadStreamWaiter streamWaiter,
                     DataPostingDownloadable postingDownloadable)

getTimeout

long getTimeout()