+wxFileOutputStream::wxFileOutputStream(const wxString& fileName)
+{
+ m_file = new wxFile(fileName, wxFile::write);
+ m_file_destroy = TRUE;
+ m_o_streambuf->SetBufferIO(1024);
+}
+
+wxFileOutputStream::wxFileOutputStream()
+ : wxOutputStream()
+{
+ m_o_streambuf->SetBufferIO(1024);
+ m_file_destroy = FALSE;
+ m_file = NULL;
+}
+
+wxFileOutputStream::~wxFileOutputStream()
+{
+ if (m_file_destroy) {
+ Sync();
+ delete m_file;
+ }