strigi/src/streams
fileinputstream.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef STRIGI_FILEINPUTSTREAM_H
00021 #define STRIGI_FILEINPUTSTREAM_H
00022
00023 #include "bufferedstream.h"
00024
00025 namespace Strigi {
00026
00030 class STREAMS_EXPORT FileInputStream : public BufferedInputStream {
00031 private:
00032 FILE *file;
00033 std::string filepath;
00034
00035 int32_t fillBuffer(char* start, int32_t space);
00037 static const int32_t defaultBufferSize;
00038 protected:
00039 void open(FILE* file, const char* filepath,
00040 int32_t buffersize=defaultBufferSize);
00041
00042 public:
00049 explicit FileInputStream(const char* filepath,
00050 int32_t buffersize=defaultBufferSize);
00051 FileInputStream(FILE* file, const char* filepath,
00052 int32_t buffersize=defaultBufferSize);
00053 ~FileInputStream();
00054 };
00055
00056 }
00057
00058 #endif
00059