diff options
Diffstat (limited to '')
-rw-r--r-- | src/emptyContentHandler.cpp | 6 | ||||
-rw-r--r-- | src/streamContentHandler.cpp | 14 | ||||
-rw-r--r-- | src/stringContentHandler.cpp | 6 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/emptyContentHandler.cpp b/src/emptyContentHandler.cpp index dceef55e..4dea2763 100644 --- a/src/emptyContentHandler.cpp +++ b/src/emptyContentHandler.cpp @@ -48,6 +48,12 @@ void emptyContentHandler::extract(utility::outputStream& /* os */) const } +void emptyContentHandler::extractRaw(utility::outputStream& /* os */) const +{ + // Nothing to do. +} + + const string::size_type emptyContentHandler::getLength() const { return (0); diff --git a/src/streamContentHandler.cpp b/src/streamContentHandler.cpp index 5da7ffba..c5f6145c 100644 --- a/src/streamContentHandler.cpp +++ b/src/streamContentHandler.cpp @@ -179,6 +179,20 @@ void streamContentHandler::extract(utility::outputStream& os) const } +void streamContentHandler::extractRaw(utility::outputStream& os) const +{ + if (m_stream == NULL && m_ownedStream.ptr() == NULL) + return; + + utility::inputStream& in = const_cast <utility::inputStream&> + (*(m_stream ? m_stream : m_ownedStream.ptr())); + + in.reset(); // may not work... + + utility::bufferedStreamCopy(in, os); +} + + const string::size_type streamContentHandler::getLength() const { return (m_length); diff --git a/src/stringContentHandler.cpp b/src/stringContentHandler.cpp index 812d8550..1d4ccc5c 100644 --- a/src/stringContentHandler.cpp +++ b/src/stringContentHandler.cpp @@ -165,6 +165,12 @@ void stringContentHandler::extract(utility::outputStream& os) const } +void stringContentHandler::extractRaw(utility::outputStream& os) const +{ + m_string.extract(os); +} + + const string::size_type stringContentHandler::getLength() const { return (m_string.length()); |