#include <ReadBuffer.hpp>
Public Methods | |
ReadBuffer (File &file, int bufferSize) | |
~ReadBuffer () | |
void | read (char *data, int length) |
const char * | peek (int length) |
const char * | read (int length) |
void | seekg (File::offset_type position, std::fstream::seekdir direction) |
File::offset_type | tellg () |
int | rdstate () |
void | invalidateg () |
|
wrap <file> in a ReadBuffer with initial buffer size <bufferSize>. The buffer may grow if necessary to support large peek() and read() requests. |
|
|
|
marks the underlying stream pointer as invalid--call this if you seek the underlying file to a new location |
|
return a pointer to a buffer containing the next <length> bytes, but do not advance the read pointer |
|
return the current read state bits, eofbit, badbit, etc. (same semantics as std::ifstream::rdstate()) |
|
return a pointer to a buffer containing the next <length> bytes, and advance the read pointer |
|
standard read() semantics; will perform an unbuffered read if the read size is large enough |
|
move the internal read pointer to <position>, which may be relative to the beginning, end or current position of the file as specified by <direction>. |
|
return the read pointer location with reference to the beginning of the file |