summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-29 00:52:30 -0800
committerPixel <pixel@nobis-crew.org>2011-11-29 00:52:30 -0800
commitd5c370efe6c04ff9d0b10f3370a62950a1310317 (patch)
tree2a814e77f50fb9946f29ef6284284ef77b7d6ff0
parentd4c4ee9aa1fdd216e46d13e3a65f26d05d1d528b (diff)
Adding a few more useful features to Buffers, such as getBuffer() and rewind().
-rw-r--r--includes/Buffer.h2
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;