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 GenBookBackendState

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

All Implemented Interfaces:
  Closeable, OpenFileState

    public class GenBookBackendState

extends AbstractOpenFileState

Stores the random access files required for processing the passage request The caller is required to close to correctly free resources and avoid File pointer leaks

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

Field Summary
`private File` | `bdtFile` The raw data file
`private RandomAccessFile` | `bdtRaf` The random access file for the raw data
`private SwordBookMetaData` | `bookMetaData`
`private static String` | `EXTENSION_BDT` Raw GenBook file extensions
`private static org.slf4j.Logger` | `log` The log stream

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

Method Summary
`RandomAccessFile` | `getBdtRaf()`
`SwordBookMetaData` | `getBookMetaData()`
`void` | `releaseResources()`

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

### EXTENSION_BDT

    private static final String EXTENSION_BDT

  Raw GenBook file extensions

  See Also:
    Constant Field Values

### bdtFile

    private File bdtFile

  The raw data file

### bdtRaf

    private RandomAccessFile bdtRaf

  The random access file for the raw data

### bookMetaData

    private SwordBookMetaData bookMetaData

### log

    private static final org.slf4j.Logger log

  The log stream

Constructor Detail

### GenBookBackendState

    GenBookBackendState(SwordBookMetaData bookMetaData)

  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

Method Detail

### releaseResources

    public void releaseResources()

### getBdtRaf

    public RandomAccessFile getBdtRaf()

  Returns:
    the bdtRaf

### getBookMetaData

    public SwordBookMetaData getBookMetaData()

  Returns:
    the bookMetaData

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