diff options
author | Vincent Richard <[email protected]> | 2012-04-16 20:32:33 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2012-04-16 20:32:33 +0000 |
commit | 4f33877820edee1b47d1b6f4fc800eaad273adaa (patch) | |
tree | 10d5d339f17f2561ef46993de308c2e7d8a9fd79 /src/utility/inputStreamByteBufferAdapter.cpp | |
parent | Split stream.hpp/.cpp into multiple source files. (diff) | |
download | vmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.tar.gz vmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.zip |
Added ability to parse directly from an input stream (eg. file). This allows very big messages to be parsed without loading the whole message data into memory.
Diffstat (limited to 'src/utility/inputStreamByteBufferAdapter.cpp')
-rw-r--r-- | src/utility/inputStreamByteBufferAdapter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utility/inputStreamByteBufferAdapter.cpp b/src/utility/inputStreamByteBufferAdapter.cpp index 92e779fe..907f1eec 100644 --- a/src/utility/inputStreamByteBufferAdapter.cpp +++ b/src/utility/inputStreamByteBufferAdapter.cpp @@ -85,6 +85,19 @@ stream::size_type inputStreamByteBufferAdapter::skip(const size_type count) } +stream::size_type inputStreamByteBufferAdapter::getPosition() const +{ + return m_pos; +} + + +void inputStreamByteBufferAdapter::seek(const size_type pos) +{ + if (pos <= m_length) + m_pos = pos; +} + + } // utility } // vmime |