Read free portions of a file in blocks. More...
#include <ReadQueueAccessFile.h>
Public Member Functions | |
ReadQueueAccessFile (char *filename) | |
Initialise class to access the given file. | |
ReadQueueAccessFile (char *filename, FileBlockQueue *sQueue, FileBlockQueue *uQueue) | |
Initialise class to access the given file, with the currently read list uQueue and the unread list sQueue. | |
ReadQueueAccessFile (char *filename, FileBlockQueue *uQueue) | |
Initialise class to access the given file, with the currently read list uQueue. | |
void | nextFileBlock (char *buffer, int blockSize) |
Read the next unread block into the buffer with the given block size. |
Read free portions of a file in blocks.
This class is used to access a file in read mode using FileIO in blocks. Queues are maintained to keep track of which parts of the file have been read and which have not. By doing this, multiple QueueAccessFiles can have access to the same file as long as they all report to each other which blocks are availble and which are not.