// wxMemoryInputStream
// ----------------------------------------------------------------------------
+IMPLEMENT_ABSTRACT_CLASS(wxMemoryInputStream, wxInputStream)
+
wxMemoryInputStream::wxMemoryInputStream(const void *data, size_t len)
{
m_i_streambuf = new wxStreamBuffer(wxStreamBuffer::read);
m_length = stream.LastRead();
}
+bool wxMemoryInputStream::CanRead() const
+{
+ return m_i_streambuf->GetIntPosition() != m_length;
+}
+
wxMemoryInputStream::~wxMemoryInputStream()
{
delete m_i_streambuf;
// wxMemoryOutputStream
// ----------------------------------------------------------------------------
+IMPLEMENT_DYNAMIC_CLASS(wxMemoryOutputStream, wxOutputStream)
+
wxMemoryOutputStream::wxMemoryOutputStream(void *data, size_t len)
{
m_o_streambuf = new wxStreamBuffer(wxStreamBuffer::write);