com.github.axet.wget.info
Class URLInfo

java.lang.Object
  extended by com.github.axet.wget.info.URLInfo
Direct Known Subclasses:
DownloadInfo

public class URLInfo
extends Object

URLInfo - keep all information about source in one place. Thread safe.

Author:
axet

Nested Class Summary
static class URLInfo.States
          Notify States
 
Constructor Summary
URLInfo(URL source)
           
 
Method Summary
 boolean empty()
           
 void extract()
           
 void extract(AtomicBoolean stop, Runnable notify)
           
protected  HttpURLConnection extractNormal()
           
protected  HttpURLConnection extractRange()
           
 String getContentFilename()
           
 String getContentType()
           
 int getDelay()
           
 Throwable getException()
           
 Long getLength()
           
 boolean getRange()
           
 URL getSource()
           
 URLInfo.States getState()
           
 void setDelay(int delay, Throwable e)
           
protected  void setException(Throwable exception)
           
 void setRange(boolean range)
           
 void setState(URLInfo.States state)
           
 void setState(URLInfo.States state, Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLInfo

public URLInfo(URL source)
Method Detail

extract

public void extract()

extract

public void extract(AtomicBoolean stop,
                    Runnable notify)

empty

public boolean empty()

extractRange

protected HttpURLConnection extractRange()
                                  throws IOException
Throws:
IOException

extractNormal

protected HttpURLConnection extractNormal()
                                   throws IOException
Throws:
IOException

getContentType

public String getContentType()

getLength

public Long getLength()

getSource

public URL getSource()

getContentFilename

public String getContentFilename()

getState

public URLInfo.States getState()

setState

public void setState(URLInfo.States state)

setState

public void setState(URLInfo.States state,
                     Throwable e)

getException

public Throwable getException()

setException

protected void setException(Throwable exception)

getDelay

public int getDelay()

setDelay

public void setDelay(int delay,
                     Throwable e)

getRange

public boolean getRange()

setRange

public void setRange(boolean range)


Copyright © 2012. All Rights Reserved.