public class ExcludeListUpdateHandler
extends java.lang.Object
| Constructor and Description |
|---|
ExcludeListUpdateHandler(java.net.URL remoteURL,
java.io.File localFile)
Create a handler for downloading exclude lists from a server.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 writtenpublic 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 listCopyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.