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