com.github.axet.wget.info
Class URLInfo

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

public class URLInfo
extends BrowserInfo

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

Author:
axet

Nested Class Summary
static class URLInfo.States
          Notify States
 
Field Summary
 
Fields inherited from class com.github.axet.wget.info.BrowserInfo
USER_AGENT
 
Constructor Summary
URLInfo(URL source)
           
 
Method Summary
 boolean empty()
           
 void extract()
           
 void extract(AtomicBoolean stop, Runnable notify)
           
protected  HttpURLConnection extractNormal(URL source)
           
protected  HttpURLConnection extractRange(URL source)
           
 String getContentFilename()
           
 String getContentType()
           
 int getDelay()
           
 Throwable getException()
           
 Long getLength()
           
 boolean getRange()
           
 URL getSource()
           
 URLInfo.States getState()
           
 void setContentFilename(String f)
           
 void setContentType(String ct)
           
 void setDelay(int delay, Throwable e)
           
 void setEmpty(boolean b)
           
protected  void setException(Throwable exception)
           
 void setLength(Long l)
           
 void setRange(boolean range)
           
 void setState(URLInfo.States state)
           
 void setState(URLInfo.States state, Throwable e)
           
 
Methods inherited from class com.github.axet.wget.info.BrowserInfo
getReferer, getUserAgent, setReferer, setUserAgent
 
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()

setEmpty

public void setEmpty(boolean b)

extractRange

protected HttpURLConnection extractRange(URL source)
                                  throws IOException
Throws:
IOException

extractNormal

protected HttpURLConnection extractNormal(URL source)
                                   throws IOException
Throws:
IOException

getContentType

public String getContentType()

setContentType

public void setContentType(String ct)

getLength

public Long getLength()

setLength

public void setLength(Long l)

getSource

public URL getSource()

getContentFilename

public String getContentFilename()

setContentFilename

public void setContentFilename(String f)

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 © 2013. All Rights Reserved.