|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.ExcludeListUpdateHandler
public class ExcludeListUpdateHandler
A class to handle downloading exclude lists from a server.
Constructor Summary | |
---|---|
ExcludeListUpdateHandler(java.net.URL remoteURL,
java.io.File localFile)
Create a handler for downloading exclude lists from a server. |
Method Summary | |
---|---|
java.io.File |
getLocalFile()
Get the file to which the exclude list should be written. |
long |
getLocalFileLastModified()
Get the time that the local file was last modified. |
java.net.URL |
getRemoteURL()
Get the URL from which the exclude list should be downloaded. |
long |
getRemoteURLLastModified()
Get the time that the remote URL was last modified. |
boolean |
isUpdateAvailable()
Determine if an update is available; this is determined by comparing the last modified times of the remote URL and the local file. |
void |
update()
Update the local file with the exclude list given by the remote URL. |
void |
updateIfNewer()
Update the local file if the remote URL has been modified more recently than the local file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExcludeListUpdateHandler(java.net.URL remoteURL, java.io.File localFile)
remoteURL
- the URL from which the exclude list should be downloadedlocalFile
- the file to which the exclude list should be writtenMethod Detail |
---|
public java.io.File getLocalFile()
public long getLocalFileLastModified()
public java.net.URL getRemoteURL()
public long getRemoteURLLastModified() throws java.io.IOException
java.io.IOException
- if there is a problem determining the information.public boolean isUpdateAvailable() throws java.io.IOException
java.io.IOException
- if there is a problem determining the resultgetLocalFileLastModified()
,
getRemoteURLLastModified()
public void update() throws java.io.IOException
java.io.IOException
- if there is a problem reading the exclude listpublic void updateIfNewer() throws java.io.IOException
java.io.IOException
- if there is a problem reading the exclude list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |