javax.rad.io
Interface IDownloadExecutor

All Known Implementing Classes:
HttpConnection

public interface IDownloadExecutor

The IDownloadExecutor is an executor for downloads of RemoteFileHandle from remote servers.


Method Summary
 long getContentLength(RemoteFileHandle pFileHandle)
          Gets the expected content length.
 java.io.InputStream readContent(RemoteFileHandle pFileHandle)
          Reads the content from the remote server as stream.
 

Method Detail

readContent

java.io.InputStream readContent(RemoteFileHandle pFileHandle)
                                throws java.io.IOException
Reads the content from the remote server as stream.

Parameters:
pFileHandle - the file handle
Returns:
the content stream
Throws:
java.io.IOException - if creating content stream failed

getContentLength

long getContentLength(RemoteFileHandle pFileHandle)
                      throws java.io.IOException
Gets the expected content length.

Parameters:
pFileHandle - the file handle
Returns:
the content length, -1 if unknown
Throws:
java.io.IOException - if getting content length failed


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.