net.sf.bloof.util
Class FileDownload

java.lang.Object
  |
  +--net.sf.bloof.util.FileDownload

public class FileDownload
extends java.lang.Object

Downloads a file

Version:
$Id: FileDownload.java,v 1.5 2003/06/02 15:58:08 pekacki Exp $
Author:
Lukasz Pekacki

Constructor Summary
FileDownload(java.net.URL aSource, java.io.File aDestFile)
          Main constructor
 
Method Summary
 void addDownloadListener(FileDownloadListener aFlistener)
          Registers a Listener for the download
 void startDownload()
          Downloads the file and saves it to the destination file if the download fails or is interrupted, the destination file is deleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDownload

public FileDownload(java.net.URL aSource,
                    java.io.File aDestFile)
Main constructor

Parameters:
aSource - URL of the source file
aDestFile - destination file
Method Detail

addDownloadListener

public void addDownloadListener(FileDownloadListener aFlistener)
Registers a Listener for the download

Parameters:
aFlistener - the listener

startDownload

public void startDownload()
                   throws java.io.IOException
Downloads the file and saves it to the destination file if the download fails or is interrupted, the destination file is deleted

Throws:
java.io.IOException - if an error occurs


Copyright © 2003 bloof@Sourceforge. All Rights Reserved.