1 % ----------------------------------------------------------------------------
3 % ----------------------------------------------------------------------------
4 \section{\class{wxDataInputStream
}}\label{wxdatainputstream
}
6 This class provides functions that read data types in a
7 portable way. It can be forced to read in big-endian order or
8 little-endian order. So, a file written by an Intel processor can be read by a
9 Sparc or anything else.
11 \wxheading{Include files
}
15 \latexignore{\rtfignore{\wxheading{Members
}}}
17 \membersection{wxDataInputStream::wxDataInputStream
}\label{wxdatainputstreamconstr
}
19 \func{}{wxDataInputStream
}{\param{wxInputStream\&
}{ stream
}}
21 Constructs a datastream object from an input stream. Only read methods will
24 \wxheading{Parameters
}
26 \docparam{stream
}{The input stream.
}
28 \membersection{wxDataInputStream::
\destruct{wxDataInputStream
}}
30 \func{}{\destruct{wxDataInputStream
}}{\void}
32 Destroys the wxDataInputStream object.
34 \membersection{wxDataInputStream::Read8
}
36 \func{unsigned char
}{Read8
}{\void}
38 Reads a single byte from the stream.
40 \membersection{wxDataInputStream::Read16
}
42 \func{unsigned short
}{Read16
}{\void}
44 Reads a
16 bit integer from the stream.
46 \membersection{wxDataInputStream::Read32
}
48 \func{unsigned long
}{Read32
}{\void}
50 Reads a
32 bit integer from the stream.
52 \membersection{wxDataInputStream::ReadDouble
}
54 \func{double
}{ReadDouble
}{\void}
56 Reads a double (IEEE encoded) from the stream.
58 \membersection{wxDataInputStream::ReadString
}
60 \func{wxString
}{wxDataInputStream::ReadString
}{\void}
62 Reads a string from a stream. Actually, this function first reads a long integer
63 specifying the length of the string (without the last null character) and then
66 % ----------------------------------------------------------------------------
68 % ----------------------------------------------------------------------------
70 \section{\class{wxDataOutputStream
}}\label{wxdataoutputstream
}
72 This class provides functions that write data types in a
73 portable way. It can be forced to read in big-endian order or
74 little-endian order. So, a file written by an Intel processor can be read by a
75 Sparc or anything else.
77 \latexignore{\rtfignore{\wxheading{Members
}}}
79 \membersection{wxDataOutputStream::wxDataOutputStream
}\label{wxdataoutputstreamconstr
}
81 \func{}{wxDataInputStream
}{\param{wxOutputStream\&
}{ stream
}}
83 Constructs a datastream object from an output stream. Only read methods will
86 \wxheading{Parameters
}
88 \docparam{stream
}{The output stream.
}
90 \membersection{wxDataOutputStream::
\destruct{wxDataOutputStream
}}
92 \func{}{\destruct{wxDataOutputStream
}}{\void}
94 Destroys the wxDataOutputStream object.
96 \membersection{wxDataOutputStream::Write8
}
98 \func{void
}{wxDataOutputStream::Write8
}{{\param unsigned char
}{i8
}}
100 Writes the single byte
{\it i8
} to the stream.
102 \membersection{wxDataOutputStream::Write16
}
104 \func{void
}{wxDataOutputStream::Write16
}{{\param unsigned short
}{i16
}}
106 Writes the
16 bit integer
{\it i16
} to the stream.
108 \membersection{wxDataOutputStream::Write32
}
110 \func{void
}{wxDataOutputStream::Write32
}{{\param unsigned long
}{i32
}}
112 Writes the
32 bit integer
{\it i32
} to the stream.
114 \membersection{wxDataOutputStream::WriteDouble
}
116 \func{void
}{wxDataOutputStream::WriteDouble
}{{\param double
}{f
}}
118 Writes the double
{\it f
} to the stream using the IEEE format.
120 \membersection{wxDataOutputStream::WriteString
}
122 \func{void
}{wxDataOutputStream::WriteString
}{{\param const wxString\&
}{string
}}
124 Writes
{\it string
} to the stream. Actually, this method writes the size of
125 the string before writing
{\it string
} itself.