| 39 | #include <stdio.h> |
| 40 | |
| 41 | class ByteStreamInFile : public ByteStreamIn |
| 42 | { |
| 43 | public: |
| 44 | ByteStreamInFile(FILE* file); |
| 45 | /* read a single byte */ |
| 46 | U32 getByte(); |
| 47 | /* read an array of bytes */ |
| 48 | void getBytes(U8* bytes, const I64 num_bytes); |
| 49 | /* is the stream seekable (e.g. stdin is not) */ |
| 50 | BOOL isSeekable() const; |
| 51 | /* get current position of stream */ |
| 52 | I64 tell() const; |
| 53 | /* seek to this position in the stream */ |
| 54 | BOOL seek(const I64 position); |
| 55 | /* seek to the end of the file */ |
| 56 | BOOL seekEnd(const I64 distance=0); |
| 57 | /* destructor */ |
| 58 | ~ByteStreamInFile(){}; |
| 59 | protected: |
| 60 | FILE* file; |
| 61 | }; |
| 62 | |
| 63 | class ByteStreamInFileLE : public ByteStreamInFile |
| 64 | { |
nothing calls this directly
no outgoing calls
no test coverage detected