|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.book.sword.state.AbstractOpenFileState
org.crosswire.jsword.book.sword.state.ZVerseBackendState
public class ZVerseBackendState
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.
The GNU Lesser General Public License for details.
Field Summary | |
---|---|
private SwordBookMetaData |
bookMetaData
|
private long |
lastBlockNum
|
private Testament |
lastTestament
|
private byte[] |
lastUncompressed
|
private static org.slf4j.Logger |
log
The log stream |
private RandomAccessFile |
ntCompRaf
|
private RandomAccessFile |
ntIdxRaf
|
private RandomAccessFile |
ntTextRaf
|
private RandomAccessFile |
otCompRaf
The compressed random access files |
private RandomAccessFile |
otIdxRaf
The index random access files |
private RandomAccessFile |
otTextRaf
The data random access files |
private static String |
SUFFIX_COMP
|
private static String |
SUFFIX_INDEX
|
private static String |
SUFFIX_PART1
|
private static String |
SUFFIX_TEXT
|
Constructor Summary | |
---|---|
ZVerseBackendState(SwordBookMetaData bookMetaData,
BlockType blockType)
This is default package access for forcing the use of the OpenFileStateManager to manage the creation. |
Method Summary | |
---|---|
SwordBookMetaData |
getBookMetaData()
|
RandomAccessFile |
getCompRaf(Testament testament)
Get the compression file for the given testament. |
RandomAccessFile |
getIdxRaf(Testament testament)
Get the index file for the given testament. |
long |
getLastBlockNum()
|
Testament |
getLastTestament()
|
byte[] |
getLastUncompressed()
|
RandomAccessFile |
getTextRaf(Testament testament)
Get the text file for the given testament. |
void |
releaseResources()
|
void |
setLastBlockNum(long lastBlockNum)
|
void |
setLastTestament(Testament lastTestament)
|
void |
setLastUncompressed(byte[] lastUncompressed)
|
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 |
---|
private static final String SUFFIX_COMP
private static final String SUFFIX_INDEX
private static final String SUFFIX_PART1
private static final String SUFFIX_TEXT
private RandomAccessFile otCompRaf
private RandomAccessFile ntCompRaf
private RandomAccessFile otTextRaf
private RandomAccessFile ntTextRaf
private RandomAccessFile otIdxRaf
private RandomAccessFile ntIdxRaf
private Testament lastTestament
private long lastBlockNum
private byte[] lastUncompressed
private SwordBookMetaData bookMetaData
private static final org.slf4j.Logger log
Constructor Detail |
---|
ZVerseBackendState(SwordBookMetaData bookMetaData, BlockType blockType) throws BookException
bookMetaData
- the appropriate metadata for the book
BookException
Method Detail |
---|
public void releaseResources()
public RandomAccessFile getCompRaf(Testament testament)
testament
- the testament for the index
public RandomAccessFile getTextRaf(Testament testament)
testament
- the testament for the index
public RandomAccessFile getIdxRaf(Testament testament)
testament
- the testament for the index
public Testament getLastTestament()
public long getLastBlockNum()
public byte[] getLastUncompressed()
public void setLastTestament(Testament lastTestament)
lastTestament
- the lastTestament to setpublic void setLastBlockNum(long lastBlockNum)
lastBlockNum
- the lastBlockNum to setpublic void setLastUncompressed(byte[] lastUncompressed)
lastUncompressed
- the lastUncompressed to setpublic SwordBookMetaData getBookMetaData()
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |