+ Write64(&i, 1);
+}
+
+void wxDataOutputStream::Write64(wxInt64 i)
+{
+ Write64(&i, 1);
+}
+#endif // wxHAS_INT64
+
+void wxDataOutputStream::Write32(wxUint32 i)
+{
+ wxUint32 i32;
+
+ if (m_be_order)
+ i32 = wxUINT32_SWAP_ON_LE(i);
+ else
+ i32 = wxUINT32_SWAP_ON_BE(i);
+ m_output->Write(&i32, 4);
+}
+
+void wxDataOutputStream::Write16(wxUint16 i)
+{
+ wxUint16 i16;
+
+ if (m_be_order)
+ i16 = wxUINT16_SWAP_ON_LE(i);
+ else
+ i16 = wxUINT16_SWAP_ON_BE(i);
+
+ m_output->Write(&i16, 2);
+}
+
+void wxDataOutputStream::Write8(wxUint8 i)
+{
+ m_output->Write(&i, 1);
+}
+
+void wxDataOutputStream::WriteString(const wxString& string)
+{
+#if wxUSE_UNICODE
+ const wxWX2MBbuf buf = string.mb_str(*m_conv);
+#else
+ const wxWX2MBbuf buf = string.mb_str();
+#endif
+ size_t len = strlen(buf);
+ Write32(len);
+ if (len > 0)
+ m_output->Write(buf, len);
+}
+
+void wxDataOutputStream::WriteDouble(double d)
+{
+#if wxUSE_APPLE_IEEE
+ if ( m_useExtendedPrecision )
+ {
+ char buf[10];
+
+ wxConvertToIeeeExtended(d, (wxInt8 *)buf);
+ m_output->Write(buf, 10);
+ }
+ else
+#endif // wxUSE_APPLE_IEEE
+ {
+ Float64Data floatData;
+
+ floatData.f = (wxFloat64)d;
+
+ if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) )
+ {
+ Write32(floatData.i[0]);
+ Write32(floatData.i[1]);
+ }
+ else
+ {
+ Write32(floatData.i[1]);
+ Write32(floatData.i[0]);
+ }
+ }
+}
+
+void wxDataOutputStream::WriteFloat(float f)
+{
+#if wxUSE_APPLE_IEEE
+ if ( m_useExtendedPrecision )
+ {
+ WriteDouble((double)f);
+ }
+ else
+#endif // wxUSE_APPLE_IEEE
+ {
+ Float32Data floatData;
+
+ floatData.f = (wxFloat32)f;
+ Write32(floatData.i);
+ }
+}
+
+#if wxHAS_INT64
+void wxDataOutputStream::Write64(const wxUint64 *buffer, size_t size)
+{
+#ifndef wxLongLong_t
+ DoWriteLL(buffer, size, m_output, m_be_order);
+#else
+ DoWriteI64(buffer, size, m_output, m_be_order);
+#endif
+}
+
+void wxDataOutputStream::Write64(const wxInt64 *buffer, size_t size)
+{
+#ifndef wxLongLong_t
+ DoWriteLL(buffer, size, m_output, m_be_order);