Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.`

Field Summary

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`

Constructor Summary
`HttpSwordInstaller()`

Method Summary
`private void` | `copy(Job job, URL url, URL dest)`
`protected void` | `download(Job job, String dir, String file, URL dest)` Utility to download a file from a remote site
`boolean` | `equals(Object object)`
`int` | `getSize(Book book)` Return true if the book is not installed or there is a newer version to install.
`String` | `getType()` Get the type of the Installer.
`int` | `hashCode()`
`URL` | `toRemoteURL(Book book)`

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`

Methods inherited from class org.crosswire.jsword.book.basic.AbstractBookList
`addBooksListener, fireBooksChanged, getBooks, removeBooksListener`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.crosswire.jsword.book.BookList
`addBooksListener, getBooks, removeBooksListener`

Constructor Detail

### HttpSwordInstaller

    public HttpSwordInstaller()

Method Detail

### 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(Job 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 progress
    `dir` - The directory from which to download the file
    `file` - The file to download
  Throws:
    `InstallException`

### copy

    private void copy(Job 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD