2
0

ByteStream.h 505 B

1234567891011121314151617181920212223242526
  1. #ifndef BELL_BYTE_READER_H
  2. #define BELL_BYTE_READER_H
  3. #include "stdlib.h"
  4. /**
  5. * A class for reading bytes from a stream. Further implemented in HTTPStream.h
  6. */
  7. namespace bell
  8. {
  9. class ByteStream
  10. {
  11. public:
  12. ByteStream(){};
  13. ~ByteStream(){};
  14. virtual size_t read(uint8_t *buf, size_t nbytes) = 0;
  15. virtual size_t skip(size_t nbytes) = 0;
  16. virtual size_t position() = 0;
  17. virtual size_t size() = 0;
  18. virtual void close() = 0;
  19. };
  20. }
  21. #endif