org.crosswire.jsword.book.sword

## Class ZLDBackend

- java.lang.Object
- - org.crosswire.jsword.book.sword.AbstractBackend<T>
  - - org.crosswire.jsword.book.sword.AbstractKeyBackend<RawLDBackendState>
    - - org.crosswire.jsword.book.sword.RawLDBackend<ZLDBackendState>
      - - org.crosswire.jsword.book.sword.ZLDBackend

- All Implemented Interfaces:
    Serializable, Cloneable, Comparable<Key>, Iterable<Key>, Backend<RawLDBackendState>, StatefulFileBackedBackend<RawLDBackendState>, Key

      public class ZLDBackend
      extends RawLDBackend<ZLDBackendState>

  An extension of RawLDBackend to read Z format files.
  Author:
    Joe Walker, DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static int` | `BLOCK_ENTRY_COUNT`
    `private static int` | `BLOCK_ENTRY_SIZE`
    `private static org.slf4j.Logger` | `log` The log stream
    `private static long` | `serialVersionUID`
    `private static int` | `ZDX_ENTRY_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZLDBackend(SwordBookMetaData sbmd)` Simple ctor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dumpIdxRaf()` Experimental code.
    `protected DataEntry` | `getEntry(RawLDBackendState fileState, DataEntry entry)` Get the entry indicated by this entry.
    `ZLDBackendState` | `initState()` Initialises the state required to read from files, specific to each different backend
    `private void` | `readObject(ObjectInputStream is)` Serialization support.

    - ### Methods inherited from class org.crosswire.jsword.book.sword.RawLDBackend

      `get, getCardinality, getIndex, getRawText, getRawTextLength, indexOf, readRawContent, toIMP`

    - ### Methods inherited from class org.crosswire.jsword.book.sword.AbstractKeyBackend

      `addAll, blur, canHaveChildren, clear, clone, compareTo, contains, equals, getChildCount, getName, getName, getOsisID, getOsisRef, getParent, getRootName, hashCode, isEmpty, iterator, removeAll, retainAll, setAliasKey, setRawText`

    - ### Methods inherited from class org.crosswire.jsword.book.sword.AbstractBackend

      `create, decipher, encipher, getBookMetaData, getGlobalKeyList, getRawText, isSupported, isWritable, readIndex, readToOsis, setAliasKey`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ZDX_ENTRY_SIZE

          private static final int ZDX_ENTRY_SIZE

      See Also:
        Constant Field Values

    - #### BLOCK_ENTRY_COUNT

          private static final int BLOCK_ENTRY_COUNT

      See Also:
        Constant Field Values

    - #### BLOCK_ENTRY_SIZE

          private static final int BLOCK_ENTRY_SIZE

      See Also:
        Constant Field Values

    - #### log

          private static final org.slf4j.Logger log

      The log stream

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ZLDBackend

          public ZLDBackend(SwordBookMetaData sbmd)

      Simple ctor
      Parameters:
        `sbmd` -

  - ### Method Detail

    - #### initState

          public ZLDBackendState initState()
                                    throws BookException

      Description copied from interface: `StatefulFileBackedBackend`
      Initialises the state required to read from files, specific to each different backend
      Specified by:
        `initState` in interface `StatefulFileBackedBackend<RawLDBackendState>`
      Overrides:
        `initState` in class `RawLDBackend<ZLDBackendState>`
      Returns:
        the state that has been initialised
      Throws:
        `BookException`

    - #### getEntry

          protected DataEntry getEntry(RawLDBackendState fileState,
                           DataEntry entry)

      Description copied from class: `RawLDBackend`
      Get the entry indicated by this entry. If this entry doesn't indicate any other entry then it returns the entry. Note, this is used by compressed dictionaries to get the deeper stuff.
      Overrides:
        `getEntry` in class `RawLDBackend<ZLDBackendState>`
      Parameters:
        `fileState` - the state where the entry can be found
        `entry` - the entry that might indicate a deeper entry
      Returns:
        the final entry

    - #### readObject

          private void readObject(ObjectInputStream is)
                           throws IOException,
                                  ClassNotFoundException

      Serialization support.
      Parameters:
        `is` -
      Throws:
        `IOException`
        `ClassNotFoundException`

    - #### dumpIdxRaf

          public void dumpIdxRaf()

      Experimental code.
      Overrides:
        `dumpIdxRaf` in class `RawLDBackend<ZLDBackendState>`