com.notuvy.net
Class Download

java.lang.Object
  extended by com.notuvy.net.Download
All Implemented Interfaces:
Runnable

public class Download
extends Object
implements Runnable

A very simple utility for downloading a resource from an URL.

Author:
murali

Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
Download(String pUrl)
           
Download(String pUrl, File pFile)
           
 
Method Summary
 File getFile()
           
 boolean getIsAborted()
           
 boolean getIsSuccessful()
           
 Progressable getProgress()
           
 int getStatusCode()
           
 String getUrl()
           
 String giveStringBody()
           
static void main(String[] args)
           
 void run()
           
 void runGui(String pTitle)
           
 void runGui(String pTitle, boolean pExitOnClose)
           
 void setBasicCredentials(String pUser, String pPass)
           
 void setIsAborted(boolean pIsAborted)
           
 void setIsSuccessful(boolean pIsSuccessful)
           
 void setProgress(Progressable pProgress)
           
 void setStatusCode(int pStatusCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Constructor Detail

Download

public Download(String pUrl)

Download

public Download(String pUrl,
                File pFile)
Method Detail

getUrl

public String getUrl()

getFile

public File getFile()

getProgress

public Progressable getProgress()

getIsAborted

public boolean getIsAborted()

getIsSuccessful

public boolean getIsSuccessful()

setStatusCode

public void setStatusCode(int pStatusCode)

setProgress

public void setProgress(Progressable pProgress)

setIsAborted

public void setIsAborted(boolean pIsAborted)

setIsSuccessful

public void setIsSuccessful(boolean pIsSuccessful)

getStatusCode

public int getStatusCode()

setBasicCredentials

public void setBasicCredentials(String pUser,
                                String pPass)

giveStringBody

public String giveStringBody()

run

public void run()
Specified by:
run in interface Runnable

runGui

public void runGui(String pTitle)

runGui

public void runGui(String pTitle,
                   boolean pExitOnClose)

main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.