Public Member Functions | |
CacheEntry (Integer key, long startPos, long endPos) | |
CacheEntry (String hexadecimal) | |
String | toHexadecimal () |
Public Attributes | |
final int | key |
final long | start |
final long | end |
Static Public Attributes | |
final int | ENTRY_LENGTH = 40 |
Having the name of the file allows to open and close the file when needed. In a previous version there was a RandomAccessFile
instead of the name but it ended up with an error because the number of open file was exceeding the maximum allowed.
|
Constructor
|
|
Constructor. Build the entry by its hexadecimal representation
|
|
Translate the content of the entry in an hexadecimal string composed of the key, the start and end. The array returned by this method can be written on a file. Its length is constant for each possible entry so the fields are not separated.
|
|
The ending position of the entry in the file |
|
The length of the bytes representing each entry. This number is useful while caching the entries on a file. 40 is 8 for the integer and 2 time 16 for the longs.
|
|
The key of the file where the entry is stored |
|
The starting position of the entry in the file |