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.state
Class RawLDBackendState

    java.lang.Object
      org.crosswire.jsword.book.sword.state.AbstractOpenFileState
          org.crosswire.jsword.book.sword.state.RawLDBackendState

All Implemented Interfaces:
  Closeable, OpenFileState

Direct Known Subclasses:
  ZLDBackendState

    public class RawLDBackendState

extends AbstractOpenFileState

State for `RawLDBackend`

Author:
  DM Smith
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`private SwordBookMetaData` | `bookMetaData`
`private File` | `datFile` The data file
`private RandomAccessFile` | `datRaf` The data random access file
`private File` | `idxFile` The index file
`private RandomAccessFile` | `idxRaf` The index random access file
`private static org.slf4j.Logger` | `log` The log stream
`private int` | `size` The number of entries in the book.

Constructor Summary
`RawLDBackendState(SwordBookMetaData bookMetaData)` This is default package access for forcing the use of the OpenFileStateManager to manage the creation.

Method Summary
`SwordBookMetaData` | `getBookMetaData()`
`RandomAccessFile` | `getDatRaf()`
`File` | `getIdxFile()`
`RandomAccessFile` | `getIdxRaf()`
`int` | `getSize()`
`void` | `releaseResources()`
`void` | `setSize(int size)`

Methods inherited from class org.crosswire.jsword.book.sword.state.AbstractOpenFileState
`close, getLastAccess, setLastAccess`

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

Field Detail

### size

    private int size

  The number of entries in the book.

### idxFile

    private File idxFile

  The index file

### idxRaf

    private RandomAccessFile idxRaf

  The index random access file

### datFile

    private File datFile

  The data file

### datRaf

    private RandomAccessFile datRaf

  The data random access file

### bookMetaData

    private SwordBookMetaData bookMetaData

### log

    private static final org.slf4j.Logger log

  The log stream

Constructor Detail

### RawLDBackendState

    RawLDBackendState(SwordBookMetaData bookMetaData)
                throws BookException

  This is default package access for forcing the use of the OpenFileStateManager to manage the creation. Not doing so may result in new instances of OpenFileState being created for no reason, and as a result, if they are released to the OpenFileStateManager by mistake this would result in leakage

  Parameters:
    `bookMetaData` - the appropriate metadata for the book
  Throws:
    `BookException`

Method Detail

### releaseResources

    public void releaseResources()

### getSize

    public int getSize()

  Returns:
    the size

### getIdxFile

    public File getIdxFile()

  Returns:
    the idxFile

### getIdxRaf

    public RandomAccessFile getIdxRaf()

  Returns:
    the idxRaf

### getDatRaf

    public RandomAccessFile getDatRaf()

  Returns:
    the datRaf

### setSize

    public void setSize(int size)

  Parameters:
    `size` - the size to set

### getBookMetaData

    public SwordBookMetaData getBookMetaData()

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