org.crosswire.jsword.book.sword
Class ZLDBackend

java.lang.Object
  extended by org.crosswire.jsword.book.sword.AbstractBackend<T>
      extended by org.crosswire.jsword.book.sword.AbstractKeyBackend<RawLDBackendState>
          extended by org.crosswire.jsword.book.sword.RawLDBackend<ZLDBackendState>
              extended by org.crosswire.jsword.book.sword.ZLDBackend
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Key>, Iterable<Key>, StatefulFileBackedBackend<RawLDBackendState>, Key

public class ZLDBackend
extends RawLDBackend<ZLDBackendState>

An extension of RawLDBackend to read Z format files.

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

Field Summary
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
ZLDBackend(SwordBookMetaData sbmd)
          Simple ctor
 
Method Summary
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, getRawText, indexOf, readRawContent
 
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, getVersification, isSupported, isWritable, readIndex, readToOsis
 
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

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

Copyright ? 2003-2011