3 #ifndef SZA_UTIL_FILEHANDLER_H
4 #define SZA_UTIL_FILEHANDLER_H
30 FileHandler(std::string path);
35 FileHandler(
const FileHandler& objToBeCopied);
40 FileHandler(FileHandler& objToBeCopied);
45 void operator=(
const FileHandler& objToBeAssigned);
50 void operator=(FileHandler& objToBeAssigned);
55 friend std::ostream& operator<<(std::ostream& os, FileHandler& obj);
60 virtual ~FileHandler();
62 void setTo(std::string path);
63 virtual void openForRead(
bool memMap=
false);
65 void advanceByNbytes(off_t bytes);
66 void setToBeginning();
68 unsigned getFileSizeInBytes();
72 off_t getCurrentOffset();
73 void read(
void* buf,
size_t nByte);
94 unsigned char* mptrHead_;
97 std::vector<unsigned char> fbuf_;
108 #endif // End #ifndef SZA_UTIL_FILEHANDLER_H