org.crosswire.jsword.book.sword.state
Class RawBackendState
java.lang.Object
org.crosswire.jsword.book.sword.state.AbstractOpenFileState
org.crosswire.jsword.book.sword.state.RawBackendState
- All Implemented Interfaces:
- Closeable, OpenFileState
- Direct Known Subclasses:
- RawFileBackendState
public class RawBackendState
- 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:
for license details.
The copyright to this program is held by it's authors.
Constructor Summary |
RawBackendState(SwordBookMetaData bookMetaData)
This is default package access for forcing the use of the
OpenFileStateManager to manage the creation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
otIdxRaf
protected RandomAccessFile otIdxRaf
ntIdxRaf
protected RandomAccessFile ntIdxRaf
otTextRaf
protected RandomAccessFile otTextRaf
ntTextRaf
protected RandomAccessFile ntTextRaf
ntIdxFile
protected File ntIdxFile
ntTextFile
protected File ntTextFile
otIdxFile
protected File otIdxFile
otTextFile
protected File otTextFile
bookMetaData
private SwordBookMetaData bookMetaData
log
private static final org.slf4j.Logger log
- The log stream
RawBackendState
RawBackendState(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
releaseIndex
public void releaseIndex()
isWritable
public boolean isWritable()
releaseResources
public void releaseResources()
getOtIdxRaf
public RandomAccessFile getOtIdxRaf()
- Returns:
- the otIdxRaf
getNtIdxRaf
public RandomAccessFile getNtIdxRaf()
- Returns:
- the ntIdxRaf
getOtTextRaf
public RandomAccessFile getOtTextRaf()
- Returns:
- the otTextRaf
getNtTextRaf
public RandomAccessFile getNtTextRaf()
- Returns:
- the ntTextRaf
getNtTextFile
public File getNtTextFile()
- Returns:
- the ntTextFile
getOtTextFile
public File getOtTextFile()
- Returns:
- the otTextFile
getNtIdxFile
public File getNtIdxFile()
- Returns:
- the ntIdxFile
getOtIdxFile
public File getOtIdxFile()
- Returns:
- the otIdxFile
getBookMetaData
public SwordBookMetaData getBookMetaData()
- Returns:
- the bookMetaData