public class QueueEntry
extends java.lang.Object
RandomAccessFile instead of the name
but it ended up with an error because the number of open file was exceeding
the maximum allowed.| Modifier and Type | Field and Description |
|---|---|
long |
end
The ending position of the entry in the file
|
static int |
ENTRY_LENGTH
The length of the bytes representing each entry.
|
int |
key
The key of the file where the entry is stored
|
long |
start
The starting position of the entry in the file
|
| Constructor and Description |
|---|
QueueEntry(java.lang.Integer key,
long startPos,
long endPos)
Constructor
|
QueueEntry(java.lang.String hexadecimal)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toHexadecimal()
Translate the content of the entry in an hexadecimal string composed
of the key, the start and end.
|
public static final int ENTRY_LENGTH
This number is useful while caching the entries on a file.
40 is 8 for the integer and 2 time 16 for the longs.
toBytes(),
Constant Field Valuespublic final int key
public final long start
public final long end
public QueueEntry(java.lang.Integer key,
long startPos,
long endPos)
key - The key of the file where the entry is storedstartPos - The starting position of the entry in the fileendPos - The ending position of the entry in the filepublic QueueEntry(java.lang.String hexadecimal)
Build the entry by its hexadecimal representation
hexadecimal - toHexadecimal()public java.lang.String toHexadecimal()
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.