public class ZLDBackendState extends RawLDBackendState
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
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 |
LOGGER
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 and Description |
---|
ZLDBackendState(BookMetaData bookMetaData)
This is default package access for forcing the use of the
OpenFileStateManager to manage the creation.
|
Modifier and Type | Method and Description |
---|---|
long |
getLastBlockNum() |
byte[] |
getLastUncompressed() |
RandomAccessFile |
getZdtRaf() |
RandomAccessFile |
getZdxRaf() |
void |
releaseResources() |
void |
setLastBlockNum(long lastBlockNum) |
void |
setLastUncompressed(byte[] lastUncompressed) |
getDatRaf, getIdxFile, getIdxRaf, getSize, setSize
close, getBookMetaData, getLastAccess, setLastAccess
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 LOGGER
ZLDBackendState(BookMetaData bookMetaData) throws BookException
bookMetaData
- the appropriate metadata for the bookBookException
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