FileRecords
is a concrete AbstractRecords…FIXME
FileRecords
is created when…FIXME
FileRecords
takes the following to be created:
FileRecords
initializes the internal properties.
FileRecords open(
File file) throws IOException // (1)
FileRecords open(
File file,
boolean mutable) throws IOException // (2)
FileRecords open(
File file,
boolean mutable,
boolean fileAlreadyExists,
int initFileSize,
boolean preallocate) throws IOException
FileRecords open(
File file,
boolean fileAlreadyExists,
int initFileSize,
boolean preallocate) throws IOException
-
Turns
mutable
flag on (true
) -
Turns
fileAlreadyExists
flag off (false
),initFileSize
as0
, andpreallocate
asfalse
open
opens a FileChannel.
open
determines the end of a FileRecords
to be created:
-
0
for the givenfileAlreadyExists
flag disabled (false
) and the givenpreallocate
flag enabled (true
) -
Integer.MAX_VALUE
otherwise
In the end, open
creates a new FileRecords
for the given file
, the channel, and the isSlice flag disabled (false
).
Note
|
|
void readInto(
ByteBuffer buffer,
int position) throws IOException
readInto
…FIXME
Note
|
|
int sizeInBytes()
Note
|
sizeInBytes is part of the BaseRecords contract for the size of the records (in bytes).
|
sizeInBytes
simply the current value of the size internal registry.
FileChannel openChannel(
File file,
boolean mutable,
boolean fileAlreadyExists,
int initFileSize,
boolean preallocate) throws IOException
openChannel
…FIXME
Note
|
openChannel is used when FileRecords utility is requested to open a log file.
|
Name | Description |
---|---|
|
|
|
Size (java.util.concurrent.atomic.AtomicInteger) that is Used when…FIXME |