<class name="QDataStream" doc="/**
&lt;p&gt;The &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt; class provides serialization of binary data to a &lt;a href=&quot;QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A data stream is a binary stream of encoded information which is 100% independent of the host computer's operating system, CPU or byte order. For example, a data stream that is written by a PC under Windows can be read by a Sun SPARC running Solaris.&lt;/p&gt;
&lt;p&gt;You can also use a data stream to read/write &lt;a href=&quot;QDataStream.html#raw&quot;&gt;raw unencoded binary data&lt;/tt&gt;&lt;/a&gt;. If you want a &amp;quot;parsing&amp;quot; input stream, see &lt;a href=&quot;QTextStream.html&quot;&gt;&lt;tt&gt;QTextStream&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt; class implements the serialization of C++'s basic data types, like &lt;tt&gt;char&lt;/tt&gt;, &lt;tt&gt;short&lt;/tt&gt;, &lt;tt&gt;int&lt;/tt&gt;, &lt;tt&gt;char *&lt;/tt&gt;, etc. Serialization of more complex data is accomplished by breaking up the data into primitive units.&lt;/p&gt;
&lt;p&gt;A data stream cooperates closely with a &lt;a href=&quot;QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;. A &lt;a href=&quot;QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; represents an input/output medium one can read data from and write data to. The &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; class is an example of an I/O device.&lt;/p&gt;
&lt;p&gt;Example (write binary data to a stream):&lt;/p&gt;
&lt;pre&gt;    QFile file(&amp;quot;file.dat&amp;quot;);
    file.open(QIODevice::WriteOnly);
    QDataStream out(&amp;amp;file);   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; we will serialize the data into the file
    out &amp;lt;&amp;lt; &amp;quot;the answer is&amp;quot;;   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; serialize a string
    out &amp;lt;&amp;lt; (qint32)42;        &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; serialize an integer&lt;/pre&gt;
&lt;p&gt;Example (read binary data from a stream):&lt;/p&gt;
&lt;pre&gt;    QFile file(&amp;quot;file.dat&amp;quot;);
    file.open(QIODevice::ReadOnly);
    QDataStream in(&amp;amp;file);    &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; read the data serialized from the file
    QString str;
    qint32 a;
    in &amp;gt;&amp;gt; str &amp;gt;&amp;gt; a;           &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; extract &amp;quot;the answer is&amp;quot; and 42&lt;/pre&gt;
&lt;p&gt;Each item written to the stream is written in a predefined binary format that varies depending on the item's type. Supported Qt types include &lt;a href=&quot;%2E%2E/gui/QBrush.html&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/gui/QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QDateTime.html&quot;&gt;&lt;tt&gt;QDateTime&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/gui/QFont.html&quot;&gt;&lt;tt&gt;QFont&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/gui/QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; and many others. For the complete list of all Qt types supporting data streaming see the &lt;a href=&quot;%2E%2E/datastreamformat.html&quot;&gt;&lt;tt&gt;Format of the QDataStream operators&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For integers it is best to always cast to a Qt integer type for writing, and to read back into the same Qt integer type. This ensures that you get integers of the size you want and insulates you from compiler and platform differences.&lt;/p&gt;
&lt;p&gt;To take one example, a &lt;tt&gt;char *&lt;/tt&gt; string is written as a 32-bit integer equal to the length of the string including the '\0' byte, followed by all the characters of the string including the '\0' byte. When reading a &lt;tt&gt;char *&lt;/tt&gt; string, 4 bytes are read to create the 32-bit length value, then that many characters for the &lt;tt&gt;char *&lt;/tt&gt; string including the '\0' terminator are read.&lt;/p&gt;
&lt;p&gt;The initial I/O device is usually set in the constructor, but can be changed with &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt;. If you've reached the end of the data (or if there is no I/O device set) &lt;a href=&quot;QDataStream.html#atEnd()&quot;&gt;&lt;tt&gt;atEnd&lt;/tt&gt;&lt;/a&gt; will return true.&lt;/p&gt;
&lt;a name=&quot;versioning&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Versioning&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt;'s binary format has evolved since Qt 1.0, and is likely to continue evolving to reflect changes done in Qt. When inputting or outputting complex types, it's very important to make sure that the same version of the stream (&lt;a href=&quot;QDataStream.html#version()&quot;&gt;&lt;tt&gt;version&lt;/tt&gt;&lt;/a&gt;) is used for reading and writing. If you need both forward and backward compatibility, you can hardcode the version number in the application:&lt;/p&gt;
&lt;pre&gt;    stream.setVersion(QDataStream::Qt_4_0);&lt;/pre&gt;
&lt;p&gt;If you are producing a new binary data format, such as a file format for documents created by your application, you could use a &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt; to write the data in a portable format. Typically, you would write a brief header containing a magic string and a version number to give yourself room for future expansion. For example:&lt;/p&gt;
&lt;pre&gt;    QFile file(&amp;quot;file.xxx&amp;quot;);
    file.open(QIODevice::WriteOnly);
    QDataStream out(&amp;amp;file);

&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; Write a header with a &amp;quot;magic number&amp;quot; and a version
    out &amp;lt;&amp;lt; (quint32)0xA0B0C0D0;
    out &amp;lt;&amp;lt; (qint32)123;

    out.setVersion(QDataStream::Qt_4_0);

&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; Write the data
    out &amp;lt;&amp;lt; lots_of_interesting_data;&lt;/pre&gt;
&lt;p&gt;Then read it in with:&lt;/p&gt;
&lt;pre&gt;    QFile file(&amp;quot;file.xxx&amp;quot;);
    file.open(QIODevice::ReadOnly);
    QDataStream in(&amp;amp;file);

&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; Read and check the header
    quint32 magic;
    in &amp;gt;&amp;gt; magic;
    if (magic != 0xA0B0C0D0)
        return XXX_BAD_FILE_FORMAT;

&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; Read the version
    qint32 version;
    in &amp;gt;&amp;gt; version;
    if (version &amp;lt; 100)
        return XXX_BAD_FILE_TOO_OLD;
    if (version &amp;gt; 123)
        return XXX_BAD_FILE_TOO_NEW;

    if (version &amp;lt;= 110)
        in.setVersion(QDataStream::Qt_3_2);
    else
        in.setVersion(QDataStream::Qt_4_0);

&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; Read the data
    in &amp;gt;&amp;gt; lots_of_interesting_data;
    if (version &amp;gt;= 120)
        in &amp;gt;&amp;gt; data_new_in_XXX_version_1_2;
    in &amp;gt;&amp;gt; other_interesting_data;&lt;/pre&gt;
&lt;p&gt;You can select which byte order to use when serializing data. The default setting is big endian (MSB first). Changing it to little endian breaks the portability (unless the reader also changes to little endian). We recommend keeping this setting unless you have special requirements.&lt;/p&gt;
&lt;a name=&quot;raw&quot;&gt;&lt;/a&gt;&lt;a name=&quot;reading-and-writing-raw-binary-data&quot;&gt;&lt;/a&gt;
&lt;h3&gt;Reading and writing raw binary data&lt;/h3&gt;
&lt;p&gt;You may wish to read/write your own raw binary data to/from the data stream directly. Data may be read from the stream into a preallocated &lt;tt&gt;char *&lt;/tt&gt; using readRawData(). Similarly data can be written to the stream using writeRawData(). Note that any encoding/decoding of the data must be done by you.&lt;/p&gt;
&lt;p&gt;A similar pair of functions is readBytes() and writeBytes(). These differ from their &lt;i&gt;raw&lt;/i&gt; counterparts as follows: readBytes() reads a quint32 which is taken to be the length of the data to be read, then that number of bytes is read into the preallocated &lt;tt&gt;char *&lt;/tt&gt;; writeBytes() writes a quint32 containing the length of the data, followed by the data. Note that any encoding/decoding of the data (apart from the length quint32) must be done by you.&lt;/p&gt;

@see &lt;a href=&quot;QTextStream.html&quot;&gt;&lt;tt&gt;QTextStream&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QDataStream(com.trolltech.qt.core.QIODevice arg__1)" doc="/**
&lt;p&gt;Constructs a data stream that uses the I/O device &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; If you use &lt;a href=&quot;%2E%2E/porting4.html#qsocket&quot;&gt;&lt;tt&gt;QSocket&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;%2E%2E/porting4.html#qsocketdevice&quot;&gt;&lt;tt&gt;QSocketDevice&lt;/tt&gt;&lt;/a&gt; as the I/O device &lt;tt&gt;arg__1&lt;/tt&gt; for reading data, you must make sure that enough data is available on the socket for the operation to successfully proceed; &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt; does not have any means to handle or recover from short-reads.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#device()&quot;&gt;&lt;tt&gt;device&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QDataStream(com.trolltech.qt.core.QByteArray arg__1)" doc="/**
&lt;p&gt;Constructs a read-only data stream that operates on byte array &lt;tt&gt;arg__1&lt;/tt&gt;. Use &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt;(&lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;*, int) if you want to write to a byte array.&lt;/p&gt;
&lt;p&gt;Since &lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; is not a &lt;a href=&quot;QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; subclass, internally a &lt;a href=&quot;QBuffer.html&quot;&gt;&lt;tt&gt;QBuffer&lt;/tt&gt;&lt;/a&gt; is created to wrap the byte array.&lt;/p&gt;
 */"/>
    <method name="public QDataStream()" doc="/**
&lt;p&gt;Constructs a data stream that has no I/O device.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean atEnd()" doc="/**
&lt;p&gt;Returns true if the I/O device has reached the end position (end of the stream or file) or if there is no I/O device set; otherwise returns false.&lt;/p&gt;

@see &lt;tt&gt;QIODevice::atEnd&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.core.QIODevice device()" doc="/**
&lt;p&gt;Returns the I/O device currently set.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#unsetDevice()&quot;&gt;&lt;tt&gt;unsetDevice&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeFloat(float f)" doc="/**
&lt;p&gt;Writes a 32-bit floating point number, &lt;tt&gt;f&lt;/tt&gt;, to the stream using the standard IEEE 754 format. Returns a reference to the stream.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeInt(int i)" doc="/**
&lt;p&gt;Writes a signed 32-bit integer, &lt;tt&gt;i&lt;/tt&gt;, to the stream and returns a reference to the stream.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeBoolean(boolean i)" doc="/**
&lt;p&gt;Writes a boolean value, &lt;tt&gt;i&lt;/tt&gt;, to the stream. Returns a reference to the stream.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeLong(long i)" doc="/**
&lt;p&gt;Writes a signed 64-bit integer, &lt;tt&gt;i&lt;/tt&gt;, to the stream and returns a reference to the stream.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeByte(byte i)"/>
    <method name="public final com.trolltech.qt.core.QDataStream writeDouble(double f)" doc="/**
&lt;p&gt;Writes a 64-bit floating point number, &lt;tt&gt;f&lt;/tt&gt;, to the stream using the standard IEEE 754 format. Returns a reference to the stream.&lt;/p&gt;
 */"/>
    <method name="public final void resetStatus()" doc="/**
&lt;p&gt;Resets the status of the data stream.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#Status-enum&quot;&gt;Status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#status()&quot;&gt;&lt;tt&gt;status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#setStatus(com.trolltech.qt.core.QDataStream.Status)&quot;&gt;&lt;tt&gt;setStatus&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDevice(com.trolltech.qt.core.QIODevice arg__1)" doc="/**
&lt;p&gt;void QDataStream::setDevice(&lt;a href=&quot;QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; *d)&lt;/p&gt;
&lt;p&gt;Sets the I/O device to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#device()&quot;&gt;&lt;tt&gt;device&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#unsetDevice()&quot;&gt;&lt;tt&gt;unsetDevice&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setStatus(com.trolltech.qt.core.QDataStream.Status status)" doc="/**
&lt;p&gt;Sets the status of the data stream to the &lt;tt&gt;status&lt;/tt&gt; given.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#Status-enum&quot;&gt;Status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#status()&quot;&gt;&lt;tt&gt;status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#resetStatus()&quot;&gt;&lt;tt&gt;resetStatus&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setVersion(int arg__1)" doc="/**
&lt;p&gt;Sets the version number of the data serialization format to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;You don't &lt;i&gt;have&lt;/i&gt; to set a version if you are using the current version of Qt, but for your own custom binary formats we recommend that you do; see &lt;a href=&quot;QDataStream.html#versioning&quot;&gt;Versioning&lt;/tt&gt;&lt;/a&gt; in the Detailed Description.&lt;/p&gt;
&lt;p&gt;In order to accommodate new functionality, the datastream serialization format of some Qt classes has changed in some versions of Qt. If you want to read data that was created by an earlier version of Qt, or write data that can be read by a program that was compiled with an earlier version of Qt, use this function to modify the serialization format used by &lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;thead&gt;&lt;tr valign=&quot;top&quot; class=&quot;qt-style&quot;&gt;&lt;th&gt;Qt Version&lt;/th&gt;&lt;th&gt;&lt;a href=&quot;QDataStream.html#QDataStream()&quot;&gt;&lt;tt&gt;QDataStream&lt;/tt&gt;&lt;/a&gt; Version&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Qt 4.2&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt 4.0&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Qt 3.3&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt 3.1, 3.2&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Qt 3.0&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt 2.1, 2.2, 2.3&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;Qt 2.0&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
&lt;tr valign=&quot;top&quot; class=&quot;even&quot;&gt;&lt;td&gt;Qt 1.x&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QDataStream.html#Version-enum&quot;&gt;Version&lt;/tt&gt;&lt;/a&gt; enum provides symbolic constants for the different versions of Qt. For example:&lt;/p&gt;
&lt;pre&gt;    QDataStream out(file);
    out.setVersion(QDataStream::Qt_4_0);&lt;/pre&gt;

@see &lt;a href=&quot;QDataStream.html#version()&quot;&gt;&lt;tt&gt;version&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#Version-enum&quot;&gt;Version&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int skipRawData(int len)" doc="/**
&lt;p&gt;Skips &lt;tt&gt;len&lt;/tt&gt; bytes from the device. Returns the number of bytes actually skipped, or -1 on error.&lt;/p&gt;
&lt;p&gt;This is equivalent to calling readRawData() on a buffer of length &lt;tt&gt;len&lt;/tt&gt; and ignoring the buffer.&lt;/p&gt;

@see &lt;tt&gt;QIODevice::seek&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.core.QDataStream.Status status()" doc="/**
&lt;p&gt;Returns the status of the data stream.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#Status-enum&quot;&gt;Status&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#setStatus(com.trolltech.qt.core.QDataStream.Status)&quot;&gt;&lt;tt&gt;setStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#resetStatus()&quot;&gt;&lt;tt&gt;resetStatus&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void unsetDevice()" doc="/**
&lt;p&gt;Unsets the I/O device. This is the same as calling &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt;(0).&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#device()&quot;&gt;&lt;tt&gt;device&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#setDevice(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;setDevice&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int version()" doc="/**
&lt;p&gt;Returns the version number of the data serialization format.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#setVersion(int)&quot;&gt;&lt;tt&gt;setVersion&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#Version-enum&quot;&gt;Version&lt;/tt&gt;&lt;/a&gt; */"/>
    <enum name="Version" doc="/**
&lt;p&gt;This enum provides symbolic synonyms for the data serialization format version numbers.&lt;/p&gt;

@see &lt;a href=&quot;QDataStream.html#setVersion(int)&quot;&gt;&lt;tt&gt;setVersion&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QDataStream.html#version()&quot;&gt;&lt;tt&gt;version&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="Qt_1_0" doc="/**
&lt;p&gt;Version 1 (Qt 1.x)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_2_0" doc="/**
&lt;p&gt;Version 2 (Qt 2.0)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_2_1" doc="/**
&lt;p&gt;Version 3 (Qt 2.1, 2.2, 2.3)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_3_0" doc="/**
&lt;p&gt;Version 4 (Qt 3.0)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_3_1" doc="/**
&lt;p&gt;Version 5 (Qt 3.1, 3.2)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_3_3" doc="/**
&lt;p&gt;Version 6 (Qt 3.3)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_4_0" doc="/**
&lt;p&gt;Version 7 (Qt 4.0, Qt 4.1)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_4_1" doc="/**
&lt;p&gt;Version 7 (Qt 4.0, Qt 4.1)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_4_2" doc="/**
&lt;p&gt;Version 8 (Qt 4.2)&lt;/p&gt;
 */"/>
        <enum-value name="Qt_4_3" doc="/**
&lt;p&gt;Version 9 (Qt 4.3)&lt;/p&gt;
 */"/>
</enum>
    <enum name="Status" doc="/**
&lt;p&gt;This enum describes the current status of the data stream.&lt;/p&gt;
 */">
        <enum-value name="Ok" doc="/**
&lt;p&gt;The data stream is operating normally.&lt;/p&gt;
 */"/>
        <enum-value name="ReadPastEnd" doc="/**
&lt;p&gt;The data stream has read past the end of the data in the underlying device.&lt;/p&gt;
 */"/>
        <enum-value name="ReadCorruptData" doc="/**
&lt;p&gt;The data stream has read corrupt data.&lt;/p&gt;
 */"/>
</enum>
</class>
