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.sword
Class AbstractBackend

    java.lang.Object
      org.crosswire.jsword.book.sword.AbstractBackend

All Implemented Interfaces:
  Activatable

Direct Known Subclasses:
  GenBookBackend, GZIPBackend, LZSSBackend, RawBackend, RawLDBackend, ZLDBackend

    public abstract class AbstractBackend

extends Object
implements Activatable

A generic way to read data from disk for later formatting.

Author:
  Joe Walker [joe at eireneh dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`private SwordBookMetaData` | `bmd`

Constructor Summary
`AbstractBackend(SwordBookMetaData sbmd)` Construct a minimal backend

Method Summary
`void` | `decipher(byte[] data)` Decipher the data in place, if it is enciphered and there is a key to unlock it.
`SwordBookMetaData` | `getBookMetaData()`
`String` | `getExpandedDataPath()`
`abstract String` | `getRawText(Key key)` Get the bytes alotted for the given verse
`abstract boolean` | `isSupported()` Returns whether this AbstractBackend is implemented.
`abstract Key` | `readIndex()` Initialise a AbstractBackend before use.

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

Methods inherited from interface org.crosswire.common.activate.Activatable
`activate, deactivate`

Field Detail

### bmd

    private SwordBookMetaData bmd

Constructor Detail

### AbstractBackend

    public AbstractBackend(SwordBookMetaData sbmd)

  Construct a minimal backend

  Parameters:
    `sbmd` -

Method Detail

### getBookMetaData

    public SwordBookMetaData getBookMetaData()

  Returns:
    Returns the Sword BookMetaData.

### decipher

    public void decipher(byte[] data)

  Decipher the data in place, if it is enciphered and there is a key to unlock it.

  Parameters:
    `data` - the data to unlock

### getExpandedDataPath

    public String getExpandedDataPath()
                               throws BookException

  Throws:
    `BookException`

### readIndex

    public abstract Key readIndex()

  Initialise a AbstractBackend before use. This method needs to call addKey() a number of times on SwordDictionary

### getRawText

    public abstract String getRawText(Key key)
                               throws BookException

  Get the bytes alotted for the given verse

  Parameters:
    `key` - The key to fetch
  Returns:
    String The data for the verse in question
  Throws:
    `BookException` - If the data can not be read.

### isSupported

    public abstract boolean isSupported()

  Returns whether this AbstractBackend is implemented.

  Returns:
    true if this AbstractBackend is implemented.

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