diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-29 00:52:30 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-29 00:52:30 -0800 |
commit | d5c370efe6c04ff9d0b10f3370a62950a1310317 (patch) | |
tree | 2a814e77f50fb9946f29ef6284284ef77b7d6ff0 | |
parent | d4c4ee9aa1fdd216e46d13e3a65f26d05d1d528b (diff) |
Adding a few more useful features to Buffers, such as getBuffer() and rewind().
-rw-r--r-- | includes/Buffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/Buffer.h b/includes/Buffer.h index b6e8159..6577c64 100644 --- a/includes/Buffer.h +++ b/includes/Buffer.h @@ -18,7 +18,9 @@ class Buffer : public SeekableHandle { virtual bool canWrite(); virtual const char * getName(); virtual off_t getSize(); + const uint8_t * getBuffer() { return m_buffer + rtell(); } void reset(); + void rewind() { rseek(0); wseek(0); } private: uint8_t * m_buffer; bool m_fromConst; |