|
||||||||||
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.RawLDBackendState
org.crosswire.jsword.book.sword.state.ZLDBackendState
public class ZLDBackendState
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.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private static byte[] |
EMPTY_BYTES
|
private static String |
EXTENSION_Z_DATA
|
private static String |
EXTENSION_Z_INDEX
|
private long |
lastBlockNum
The index of the block that is cached. |
private byte[] |
lastUncompressed
The cache for a read of a compressed block. |
private static org.slf4j.Logger |
log
The log stream |
private File |
zdtFile
The compressed text. |
private RandomAccessFile |
zdtRaf
The compressed text random access file. |
private File |
zdxFile
The compressed index. |
private RandomAccessFile |
zdxRaf
The compressed index random access file. |
Constructor Summary | |
---|---|
ZLDBackendState(SwordBookMetaData bookMetaData)
This is default package access for forcing the use of the OpenFileStateManager to manage the creation. |
Method Summary | |
---|---|
long |
getLastBlockNum()
|
byte[] |
getLastUncompressed()
|
RandomAccessFile |
getZdtRaf()
|
RandomAccessFile |
getZdxRaf()
|
void |
releaseResources()
|
void |
setLastBlockNum(long lastBlockNum)
|
void |
setLastUncompressed(byte[] lastUncompressed)
|
Methods inherited from class org.crosswire.jsword.book.sword.state.RawLDBackendState |
---|
getBookMetaData, getDatRaf, getIdxFile, getIdxRaf, getSize, setSize |
Methods inherited from class org.crosswire.jsword.book.sword.state.AbstractOpenFileState |
---|
close |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final byte[] EMPTY_BYTES
private static final String EXTENSION_Z_INDEX
private static final String EXTENSION_Z_DATA
private File zdxFile
private RandomAccessFile zdxRaf
private File zdtFile
private RandomAccessFile zdtRaf
private long lastBlockNum
private byte[] lastUncompressed
private static final org.slf4j.Logger log
Constructor Detail |
---|
ZLDBackendState(SwordBookMetaData bookMetaData) throws BookException
bookMetaData
- the appropriate metadata for the book
BookException
Method Detail |
---|
public void releaseResources()
releaseResources
in interface OpenFileState
releaseResources
in class RawLDBackendState
public RandomAccessFile getZdxRaf()
public RandomAccessFile getZdtRaf()
public long getLastBlockNum()
public byte[] getLastUncompressed()
public void setLastBlockNum(long lastBlockNum)
lastBlockNum
- the lastBlockNum to setpublic void setLastUncompressed(byte[] lastUncompressed)
lastUncompressed
- the lastUncompressed to set
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |