org.crosswire.jsword.book.install.sword
Class HttpSwordInstaller
java.lang.Object
org.crosswire.jsword.book.basic.AbstractBookList
org.crosswire.jsword.book.install.sword.AbstractSwordInstaller
org.crosswire.jsword.book.install.sword.HttpSwordInstaller
- All Implemented Interfaces:
- Comparable, BookList, Installer
public class HttpSwordInstaller
- extends AbstractSwordInstaller
An implementation of Installer for reading data from Sword Web sites.
- Author:
- Mark Goodwin [goodwinster at gmail dot com], Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
- See Also:
for license details.
The copyright to this program is held by it's authors.
Fields inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller |
directory, DOWNLOAD_PREFIX, entries, FILE_LIST_GZ, host, loaded, PACKAGE_DIR, proxyHost, proxyPort, SEARCH_DIR, ZIP_SUFFIX |
Methods inherited from class org.crosswire.jsword.book.install.sword.AbstractSwordInstaller |
compareTo, downloadSearchIndex, equals, getBooks, getCachedIndexFile, getDirectory, getHost, getInstallerDefinition, getProxyHost, getProxyPort, install, isNewer, reloadBookList, setDirectory, setHost, setProxyHost, setProxyPort |
HttpSwordInstaller
public HttpSwordInstaller()
getType
public String getType()
- Description copied from interface:
Installer
- Get the type of the Installer.
- Returns:
- the type of the installer
getSize
public int getSize(Book book)
- Description copied from interface:
Installer
- Return true if the book is not installed or there is a newer
version to install.
- Parameters:
book
- The book meta-data to check on.
- Returns:
- whether there is a newer version to install
toRemoteURL
public URL toRemoteURL(Book book)
- Parameters:
book
- The book meta-data to get a URL from.
- Returns:
- the remote url for the BookMetaData
download
protected void download(Progress job,
String dir,
String file,
URL dest)
throws InstallException
- Description copied from class:
AbstractSwordInstaller
- Utility to download a file from a remote site
- Specified by:
download
in class AbstractSwordInstaller
- Parameters:
job
- The way of noting progressdir
- The directory from which to download the filefile
- The file to download
- Throws:
InstallException
copy
private void copy(Progress job,
URL url,
URL dest)
throws LucidException
- Parameters:
job
- url
- dest
-
- Throws:
LucidException
equals
public boolean equals(Object object)
- Overrides:
equals
in class AbstractSwordInstaller
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractSwordInstaller