}
} // eo IOImplementation::doWrite
+/**
+ * Return a copy of the input buffer.
+ */
+std::string IOImplementation::getInput() const
+{
+ return m_input_buffer;
+}
+
+/**
+ * Return the input buffer and clear it.
+ */
+std::string IOImplementation::getInputClear()
+{
+ std::string retbuf;
+
+ retbuf.swap(m_input_buffer);
+
+ return retbuf;
+}
+
+/**
+ * Return true if there are bytes available in the input buffer.
+ */
+bool IOImplementation::inputAvailable() const
+{
+ return !m_input_buffer.empty();
+}
+
+/**
+ * Cut off the first len bytes from the input buffer.
+ * @returns The number of bytes actually shortened
+ */
+std::string::size_type IOImplementation::shortenInput(std::string::size_type len)
+{
+ std::string::size_type real_len=len;
+ if (real_len > m_input_buffer.size())
+ real_len=m_input_buffer.size();
+
+ if (real_len > 0)
+ m_input_buffer.erase(0,real_len);
+
+ return real_len;
+}
/*
* implementation of SimpleIO