// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include <stdlib.h>
-#include <wx/stream.h>
-#include <wx/mstream.h>
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_STREAMS
+
+#include <stdlib.h>
+#include <wx/stream.h>
+#include <wx/mstream.h>
+
// ----------------------------------------------------------------------------
// wxMemoryInputStream
// ----------------------------------------------------------------------------
wxMemoryInputStream::wxMemoryInputStream(const char *data, size_t len)
: wxInputStream()
{
- m_i_streambuf->SetBufferIO((char *)data, data+len);
+ m_i_streambuf->SetBufferIO((char*) data, (char*) (data+len));
+ m_i_streambuf->SetIntPosition(0); // seek to start pos
m_i_streambuf->Fixed(TRUE);
+ m_length = len;
}
wxMemoryInputStream::~wxMemoryInputStream()
wxMemoryOutputStream::~wxMemoryOutputStream()
{
}
+
+#endif