Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2087

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QIODevice" doc="/**
&lt;p&gt;The &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; class is the base interface class of all I/O devices in Qt.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; provides both a common implementation and an abstract interface for devices that support reading and writing of blocks of data, such as &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QBuffer.html&quot;&gt;&lt;tt&gt;QBuffer&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt;. &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; is abstract and can not be instantiated, but it is common to use the interface it defines to provide device-independent I/O features. For example, Qt's XML classes operate on a &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; pointer, allowing them to be used with various devices (such as files and buffers).&lt;/p&gt;
&lt;p&gt;Before accessing the device, &lt;a href=&quot;QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt; must be called to set the correct OpenMode (such as &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;ReadOnly&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;ReadWrite&lt;/tt&gt;&lt;/a&gt;). You can then write to the device with &lt;a href=&quot;QIODevice.html#write(com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;write&lt;/tt&gt;&lt;/a&gt; or putChar(), and read by calling either &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QIODevice.html#readLine(long)&quot;&gt;&lt;tt&gt;readLine&lt;/tt&gt;&lt;/a&gt;, or &lt;a href=&quot;QIODevice.html#readAll()&quot;&gt;&lt;tt&gt;readAll&lt;/tt&gt;&lt;/a&gt;. Call &lt;a href=&quot;QIODevice.html#close()&quot;&gt;&lt;tt&gt;close&lt;/tt&gt;&lt;/a&gt; when you are done with the device.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; distinguishes between two types of devices: random-access devices and sequential devices.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Random-access devices support seeking to arbitrary positions using &lt;a href=&quot;QIODevice.html#seek(long)&quot;&gt;&lt;tt&gt;seek&lt;/tt&gt;&lt;/a&gt;. The current position in the file is available by calling &lt;a href=&quot;QIODevice.html#pos()&quot;&gt;&lt;tt&gt;pos&lt;/tt&gt;&lt;/a&gt;. &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QBuffer.html&quot;&gt;&lt;tt&gt;QBuffer&lt;/tt&gt;&lt;/a&gt; are examples of random-access devices.&lt;/li&gt;
&lt;li&gt;Sequential devices don't support seeking to arbitrary positions. The data must be read in one pass. The functions &lt;a href=&quot;QIODevice.html#pos()&quot;&gt;&lt;tt&gt;pos&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QIODevice.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt; don't work for sequential devices. &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QProcess.html&quot;&gt;&lt;tt&gt;QProcess&lt;/tt&gt;&lt;/a&gt; are examples of sequential devices.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can use &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt; to determine the type of device.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; emits &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; when new data is available for reading; for example, if new data has arrived on the network or if additional data is appended to a file that you are reading from. You can call &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt; to determine the number of bytes that currently available for reading. It's common to use &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt; together with the &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal when programming with asynchronous devices such as &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt;, where fragments of data can arrive at arbitrary points in time. &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; emits the &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; signal every time a payload of data has been written to the device. Use &lt;a href=&quot;QIODevice.html#bytesToWrite()&quot;&gt;&lt;tt&gt;bytesToWrite&lt;/tt&gt;&lt;/a&gt; to determine the current amount of data waiting to be written.&lt;/p&gt;
&lt;p&gt;Certain subclasses of &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, such as &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QProcess.html&quot;&gt;&lt;tt&gt;QProcess&lt;/tt&gt;&lt;/a&gt;, are asynchronous. This means that I/O functions such as &lt;a href=&quot;QIODevice.html#write(com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;write&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt; always return immediately, while communication with the device itself may happen when control goes back to the event loop. &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; provides functions that allow you to force these operations to be performed immediately, while blocking the calling thread and without entering the event loop. This allows &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; subclasses to be used without an event loop, or in a separate thread:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; - This function suspends operation in the calling thread until new data is available for reading.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; - This function suspends operation in the calling thread until one payload of data has been written to the device.&lt;/li&gt;
&lt;li&gt;waitFor...&amp;#x2e;() - Subclasses of &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; implement blocking functions for device-specific operations. For example, &lt;a href=&quot;QProcess.html&quot;&gt;&lt;tt&gt;QProcess&lt;/tt&gt;&lt;/a&gt; has a function called waitForStarted() which suspends operation in the calling thread until the process has started.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Calling these functions from the main, GUI thread, may cause your user interface to freeze. Example:&lt;/p&gt;
&lt;pre&gt;    QProcess gzip;
    gzip.start(&amp;quot;gzip&amp;quot;, QStringList() &amp;lt;&amp;lt; &amp;quot;-c&amp;quot;);
    if (!gzip.waitForStarted())
        return false;

    gzip.write(&amp;quot;uncompressed data&amp;quot;);

    QByteArray compressed;
    while (gzip.waitForReadyRead())
        compressed += gzip.readAll();&lt;/pre&gt;
&lt;p&gt;By subclassing &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, you can provide the same interface to your own I/O devices. Subclasses of &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; are only required to implement the protected &lt;a href=&quot;QIODevice.html#readData(byte[])&quot;&gt;&lt;tt&gt;readData&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QIODevice.html#writeData(byte[])&quot;&gt;&lt;tt&gt;writeData&lt;/tt&gt;&lt;/a&gt; functions. &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; uses these functions to implement all its convenience functions, such as getChar(), &lt;a href=&quot;QIODevice.html#readLine(long)&quot;&gt;&lt;tt&gt;readLine&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QIODevice.html#write(com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;write&lt;/tt&gt;&lt;/a&gt;. &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; also handles access control for you, so you can safely assume that the device is opened in write mode if &lt;a href=&quot;QIODevice.html#writeData(byte[])&quot;&gt;&lt;tt&gt;writeData&lt;/tt&gt;&lt;/a&gt; is called.&lt;/p&gt;
&lt;p&gt;Some subclasses, such as &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt;, are implemented using a memory buffer for intermediate storing of data. This reduces the number of required device accessing calls, which are often very slow. Buffering makes functions like getChar() and putChar() fast, as they can operate on the memory buffer instead of directly on the device itself. Certain I/O operations, however, don't work well with a buffer. For example, if several users open the same device and read it character by character, they may end up reading the same data when they meant to read a separate chunk each. For this reason, &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; allows you to bypass any buffering by passing the Unbuffered flag to &lt;a href=&quot;QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;. When subclassing &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, remember to bypass any buffer you may use when the device is open in Unbuffered mode.&lt;/p&gt;

@see &lt;a href=&quot;QBuffer.html&quot;&gt;&lt;tt&gt;QBuffer&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt; */">
    <signal name="protected final void aboutToClose()" doc="/**
&lt;p&gt;This signal is emitted when the device is about to close. Connect this signal if you have operations that need to be performed before the device closes (e.g&amp;#x2e;, if you have data in a separate buffer that needs to be written to the device).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void bytesWritten(long bytes)" doc="/**
&lt;p&gt;This signal is emitted every time a payload of data has been written to the device. The &lt;tt&gt;bytes&lt;/tt&gt; argument is set to the number of bytes that were written in this payload.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; is not emitted recursively; if you reenter the event loop or call &lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; inside a slot connected to the &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; signal, the signal will not be reemitted (although &lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; may still return true).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(long bytes)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void readyRead()" doc="/**
&lt;p&gt;This signal is emitted once every time new data is available for reading from the device. It will only be emitted again once new data is available, such as when a new payload of network data has arrived on your network socket, or when a new block of data has been appended to your device.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; is not emitted recursively; if you reenter the event loop or call &lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; inside a slot connected to the &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal, the signal will not be reemitted (although &lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; may still return true).&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QIODevice()" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; object.&lt;/p&gt;
 */"/>
    <method name="public QIODevice(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; object with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.String errorString()" doc="/**
&lt;p&gt;Returns a human-readable description of the last device error that occurred.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#setErrorString(java.lang.String)&quot;&gt;&lt;tt&gt;setErrorString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isOpen()" doc="/**
&lt;p&gt;Returns true if the device is open; otherwise returns false. A device is open if it can be read from and/or written to. By default, this function returns false if &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt; returns &lt;tt&gt;NotOpen&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public final boolean isReadable()" doc="/**
&lt;p&gt;Returns true if data can be read from the device; otherwise returns false. Use &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt; to determine how many bytes can be read.&lt;/p&gt;
&lt;p&gt;This is a convenience function which checks if the OpenMode of the device contains the &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;ReadOnly&lt;/tt&gt;&lt;/a&gt; flag.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public final boolean isTextModeEnabled()" doc="/**
&lt;p&gt;Returns true if the &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;Text&lt;/tt&gt;&lt;/a&gt; flag is enabled; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#setTextModeEnabled(boolean)&quot;&gt;&lt;tt&gt;setTextModeEnabled&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isWritable()" doc="/**
&lt;p&gt;Returns true if data can be written to the device; otherwise returns false.&lt;/p&gt;
&lt;p&gt;This is a convenience function which checks if the OpenMode of the device contains the &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;WriteOnly&lt;/tt&gt;&lt;/a&gt; flag.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.core.QIODevice.OpenMode openMode()" doc="/**
&lt;p&gt;Returns the mode in which the device has been opened; i.e&amp;#x2e; &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;ReadOnly&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;WriteOnly&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;setOpenMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.core.QByteArray peek(long maxlen)" doc="/**
&lt;p&gt;Peeks at most &lt;tt&gt;maxlen&lt;/tt&gt; bytes from the device, returning the data peeked as a &lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    bool isExeFile(QFile *file)
    {
        return file-&amp;gt;peek(2) == &amp;quot;MZ&amp;quot;;
    }&lt;/pre&gt;
&lt;p&gt;This function has no way of reporting errors; returning an empty &lt;a href=&quot;%2E%2E/porting4.html#qbytearray&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; can mean either that no data was currently available for peeking, or that an error occurred.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean putByte(byte c)" doc="/**
&lt;p&gt;Writes the character &lt;tt&gt;c&lt;/tt&gt; to the device. Returns true on success; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#write(com.trolltech.qt.core.QByteArray)&quot;&gt;&lt;tt&gt;write&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;getChar&lt;/tt&gt;
@see &lt;tt&gt;ungetChar&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.core.QByteArray read(long maxlen)" doc="/**
&lt;p&gt;Reads at most &lt;tt&gt;maxlen&lt;/tt&gt; bytes from the device, and returns the data read as a &lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This function has no way of reporting errors; returning an empty &lt;a href=&quot;%2E%2E/porting4.html#qbytearray&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; can mean either that no data was currently available for reading, or that an error occurred.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QByteArray readAll()" doc="/**
&lt;p&gt;Reads all available data from the device, and returns it as a &lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This function has no way of reporting errors; returning an empty &lt;a href=&quot;%2E%2E/porting4.html#qbytearray&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; can mean either that no data was currently available for reading, or that an error occurred.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QByteArray readLine(long maxlen)" doc="/**
&lt;p&gt;Reads a line from the device, but no more than &lt;tt&gt;maxlen&lt;/tt&gt; characters, and returns the result as a &lt;a href=&quot;QByteArray.html&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This function has no way of reporting errors; returning an empty &lt;a href=&quot;%2E%2E/porting4.html#qbytearray&quot;&gt;&lt;tt&gt;QByteArray&lt;/tt&gt;&lt;/a&gt; can mean either that no data was currently available for reading, or that an error occurred.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.core.QByteArray readLine()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QIODevice.html#readLine(long)&quot;&gt;&lt;tt&gt;readLine&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="protected final void setErrorString(java.lang.String errorString)" doc="/**
&lt;p&gt;Sets the human readable description of the last device error that occurred to &lt;tt&gt;errorString&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#errorString()&quot;&gt;&lt;tt&gt;errorString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode openMode)" doc="/**
&lt;p&gt;Sets the OpenMode of the device to &lt;tt&gt;openMode&lt;/tt&gt;. Call this function to set the open mode when reimplementing &lt;a href=&quot;QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public final void setTextModeEnabled(boolean enabled)" doc="/**
&lt;p&gt;If &lt;tt&gt;enabled&lt;/tt&gt; is true, this function sets the &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;Text&lt;/tt&gt;&lt;/a&gt; flag on the device; otherwise the &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;Text&lt;/tt&gt;&lt;/a&gt; flag is removed. This feature is useful for classes that provide custom end-of-line handling on a &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#isTextModeEnabled()&quot;&gt;&lt;tt&gt;isTextModeEnabled&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;setOpenMode&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void ungetByte(byte c)" doc="/**
&lt;p&gt;Puts the character &lt;tt&gt;c&lt;/tt&gt; back into the device, and decrements the current position unless the position is 0. This function is usually called to &amp;quot;undo&amp;quot; a getChar() operation, such as when writing a backtracking parser.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;c&lt;/tt&gt; was not previously read from the device, the behavior is undefined.&lt;/p&gt;
 */"/>
    <method name="public final long write(com.trolltech.qt.core.QByteArray data)" doc="/**
&lt;p&gt;Writes the content of &lt;tt&gt;data&lt;/tt&gt; to the device. Returns the number of bytes that were actually written, or -1 if an error occurred.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#writeData(byte[])&quot;&gt;&lt;tt&gt;writeData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean atEnd()" doc="/**
&lt;p&gt;Returns true if the current read and write position is at the end of the device (i.e&amp;#x2e; there is no more data available for reading on the device); otherwise returns false.&lt;/p&gt;
&lt;p&gt;For some devices, &lt;a href=&quot;QIODevice.html#atEnd()&quot;&gt;&lt;tt&gt;atEnd&lt;/tt&gt;&lt;/a&gt; can return true even though there is more data to read. This special case only applies to devices that generate data in direct response to you calling &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt; (e.g&amp;#x2e;, &lt;tt&gt;/dev&lt;/tt&gt; or &lt;tt&gt;/proc&lt;/tt&gt; files on Unix and Mac OS X, or console input / &lt;tt&gt;stdin&lt;/tt&gt; on all platforms).&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#read(long)&quot;&gt;&lt;tt&gt;read&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public long bytesAvailable()" doc="/**
&lt;p&gt;Returns the number of bytes that are available for reading. This function is commonly used with sequential devices to determine the number of bytes to allocate in a buffer before reading.&lt;/p&gt;
&lt;p&gt;Subclasses that reimplement this function must call the base implementation in order to include the size of QIODevices' buffer. Example:&lt;/p&gt;
&lt;pre&gt;    qint64 CustomDevice::bytesAvailable() const
    {
        return buffer.size() + QIODevice::bytesAvailable();
    }&lt;/pre&gt;

@see &lt;a href=&quot;QIODevice.html#bytesToWrite()&quot;&gt;&lt;tt&gt;bytesToWrite&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public long bytesToWrite()" doc="/**
&lt;p&gt;For buffered devices, this function returns the number of bytes waiting to be written. For devices with no buffer, this function returns 0.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean canReadLine()" doc="/**
&lt;p&gt;Returns true if a complete line of data can be read from the device; otherwise returns false.&lt;/p&gt;
&lt;p&gt;Note that unbuffered devices, which have no way of determining what can be read, always return false.&lt;/p&gt;
&lt;p&gt;This function is often called in conjunction with the &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal.&lt;/p&gt;
&lt;p&gt;Subclasses that reimplement this function must call the base implementation in order to include the size of the &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;'s buffer. Example:&lt;/p&gt;
&lt;pre&gt;    bool CustomDevice::canReadLine() const
    {
        return buffer.contains('\n') || QIODevice::canReadLine();
    }&lt;/pre&gt;

@see &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#readLine(long)&quot;&gt;&lt;tt&gt;readLine&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void close()" doc="/**
&lt;p&gt;First emits &lt;a href=&quot;QIODevice.html#aboutToClose()&quot;&gt;&lt;tt&gt;aboutToClose&lt;/tt&gt;&lt;/a&gt;, then closes the device and sets its OpenMode to &lt;a href=&quot;QIODevice.html#OpenModeFlag-enum&quot;&gt;&lt;tt&gt;NotOpen&lt;/tt&gt;&lt;/a&gt;. The error string is also reset.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;setOpenMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public boolean isSequential()" doc="/**
&lt;p&gt;Returns true if this device is sequential; otherwise returns false.&lt;/p&gt;
&lt;p&gt;Sequential devices, as opposed to a random-access devices, have no concept of a start, an end, a size, or a current position, and they do not support seeking. You can only read from the device when it reports that data is available. The most common example of a sequential device is a network socket. On Unix, special files such as /dev/zero and fifo pipes are sequential.&lt;/p&gt;
&lt;p&gt;Regular files, on the other hand, do support random access. They have both a size and a current position, and they also support seeking backwards and forwards in the data stream. Regular files are non-sequential.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean open(com.trolltech.qt.core.QIODevice.OpenMode mode)" doc="/**
&lt;p&gt;Opens the device and sets its OpenMode to &lt;tt&gt;mode&lt;/tt&gt;. Returns true if successful; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;OpenMode&lt;/tt&gt; */"/>
    <method name="public long pos()" doc="/**
&lt;p&gt;For random-access devices, this function returns the position that data is written to or read from. For sequential devices or closed devices, where there is no concept of a &amp;quot;current position&amp;quot;, 0 is returned.&lt;/p&gt;
&lt;p&gt;The current read/write position of the device is maintained internally by &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, so reimplementing this function is not necessary. When subclassing &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, use QIODevice::seek() to notify &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; about changes in the device position.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#seek(long)&quot;&gt;&lt;tt&gt;seek&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected abstract int readData(byte[] data)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QIODevice.html#readData(byte[])&quot;&gt;&lt;tt&gt;readData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;data&lt;/tt&gt;, ). */"/>
    <method name="protected int readLineData(byte[] data)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QIODevice.html#readLineData(byte[])&quot;&gt;&lt;tt&gt;readLineData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;data&lt;/tt&gt;, ). */"/>
    <method name="public boolean reset()" doc="/**
&lt;p&gt;Seeks to the start of input for random-access devices. Returns true on success; otherwise returns false (for example, if the device is not open).&lt;/p&gt;
&lt;p&gt;Note that when using a &lt;a href=&quot;QTextStream.html&quot;&gt;&lt;tt&gt;QTextStream&lt;/tt&gt;&lt;/a&gt; on a &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt;, calling &lt;a href=&quot;QIODevice.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt; on the &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; will not have the expected result because &lt;a href=&quot;QTextStream.html&quot;&gt;&lt;tt&gt;QTextStream&lt;/tt&gt;&lt;/a&gt; buffers the file. Use the QTextStream::seek() function instead.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#seek(long)&quot;&gt;&lt;tt&gt;seek&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean seek(long pos)" doc="/**
&lt;p&gt;For random-access devices, this function sets the current position to &lt;tt&gt;pos&lt;/tt&gt;, returning true on success, or false if an error occurred. For sequential devices, the default behavior is to do nothing and return false.&lt;/p&gt;
&lt;p&gt;When subclassing &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;, you must call QIODevice::seek() at the start of your function to ensure integrity with &lt;a href=&quot;QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;'s built-in buffer. The base implementation always returns true.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#pos()&quot;&gt;&lt;tt&gt;pos&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public long size()" doc="/**
&lt;p&gt;For open random-access devices, this function returns the size of the device. For open sequential devices, &lt;a href=&quot;QIODevice.html#bytesAvailable()&quot;&gt;&lt;tt&gt;bytesAvailable&lt;/tt&gt;&lt;/a&gt; is returned.&lt;/p&gt;
&lt;p&gt;If the device is closed, the size returned will not reflect the actual size of the device.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#isSequential()&quot;&gt;&lt;tt&gt;isSequential&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QIODevice.html#pos()&quot;&gt;&lt;tt&gt;pos&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean waitForBytesWritten(int msecs)" doc="/**
&lt;p&gt;For buffered devices, this function waits until a payload of buffered written data has been written to the device and the &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; signal has been emitted, or until &lt;tt&gt;msecs&lt;/tt&gt; milliseconds have passed. If msecs is -1, this function will not time out. For unbuffered devices, it returns immediately.&lt;/p&gt;
&lt;p&gt;Returns true if a payload of data was written to the device; otherwise returns false (i.e&amp;#x2e; if the operation timed out, or if an error occurred).&lt;/p&gt;
&lt;p&gt;This function can operate without an event loop. It is useful when writing non-GUI applications and when performing I/O operations in a non-GUI thread.&lt;/p&gt;
&lt;p&gt;If called from within a slot connected to the &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; signal, &lt;a href=&quot;QIODevice.html#bytesWritten(long)&quot;&gt;&lt;tt&gt;bytesWritten&lt;/tt&gt;&lt;/a&gt; will not be reemitted.&lt;/p&gt;
&lt;p&gt;Reimplement this function to provide a blocking API for a custom device. The default implementation does nothing, and returns false.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; Calling this function from the main (GUI) thread might cause your user interface to freeze.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#waitForReadyRead(int)&quot;&gt;&lt;tt&gt;waitForReadyRead&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean waitForReadyRead(int msecs)" doc="/**
&lt;p&gt;Blocks until data is available for reading and the &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal has been emitted, or until &lt;tt&gt;msecs&lt;/tt&gt; milliseconds have passed. If msecs is -1, this function will not time out.&lt;/p&gt;
&lt;p&gt;Returns true if data is available for reading; otherwise returns false (if the operation timed out or if an error occurred).&lt;/p&gt;
&lt;p&gt;This function can operate without an event loop. It is useful when writing non-GUI applications and when performing I/O operations in a non-GUI thread.&lt;/p&gt;
&lt;p&gt;If called from within a slot connected to the &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; signal, &lt;a href=&quot;QIODevice.html#readyRead()&quot;&gt;&lt;tt&gt;readyRead&lt;/tt&gt;&lt;/a&gt; will not be reemitted.&lt;/p&gt;
&lt;p&gt;Reimplement this function to provide a blocking API for a custom device. The default implementation does nothing, and returns false.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Warning:&lt;/b&gt; Calling this function from the main (GUI) thread might cause your user interface to freeze.&lt;/p&gt;

@see &lt;a href=&quot;QIODevice.html#waitForBytesWritten(int)&quot;&gt;&lt;tt&gt;waitForBytesWritten&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected abstract int writeData(byte[] data)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QIODevice.html#writeData(byte[])&quot;&gt;&lt;tt&gt;writeData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;data&lt;/tt&gt;, ). */"/>
    <enum name="OpenModeFlag" doc="/**
&lt;p&gt;This enum is used with &lt;a href=&quot;QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)&quot;&gt;&lt;tt&gt;open&lt;/tt&gt;&lt;/a&gt; to describe the mode in which a device is opened. It is also returned by &lt;a href=&quot;QIODevice.html#openMode()&quot;&gt;&lt;tt&gt;openMode&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Certain flags, such as &lt;tt&gt;Unbuffered&lt;/tt&gt; and &lt;tt&gt;Truncate&lt;/tt&gt;, are meaningless when used with some subclasses. Some of these restrictions are implied by the type of device that is represented by a subclass; for example, access to a &lt;a href=&quot;QBuffer.html&quot;&gt;&lt;tt&gt;QBuffer&lt;/tt&gt;&lt;/a&gt; is always unbuffered. In other cases, the restriction may be due to the implementation, or may be imposed by the underlying platform; for example, &lt;a href=&quot;%2E%2E/network/QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt; does not support &lt;tt&gt;Unbuffered&lt;/tt&gt; mode, and limitations in the native API prevent &lt;a href=&quot;QFile.html&quot;&gt;&lt;tt&gt;QFile&lt;/tt&gt;&lt;/a&gt; from supporting &lt;tt&gt;Unbuffered&lt;/tt&gt; on Windows.&lt;/p&gt;
 */">
        <enum-value name="NotOpen" doc="/**
&lt;p&gt;The device is not open.&lt;/p&gt;
 */"/>
        <enum-value name="ReadOnly" doc="/**
&lt;p&gt;The device is open for reading.&lt;/p&gt;
 */"/>
        <enum-value name="WriteOnly" doc="/**
&lt;p&gt;The device is open for writing.&lt;/p&gt;
 */"/>
        <enum-value name="ReadWrite" doc="/**
&lt;p&gt;The device is open for reading and writing.&lt;/p&gt;
 */"/>
        <enum-value name="Append" doc="/**
&lt;p&gt;The device is opened in append mode, so that all data is written to the end of the file.&lt;/p&gt;
 */"/>
        <enum-value name="Truncate" doc="/**
&lt;p&gt;If possible, the device is truncated before it is opened. All earlier contents of the device are lost.&lt;/p&gt;
 */"/>
        <enum-value name="Text" doc="/**
&lt;p&gt;When reading, the end-of-line terminators are translated to '\n'. When writing, the end-of-line terminators are translated to the local encoding, for example '\r\n' for Win32.&lt;/p&gt;
 */"/>
        <enum-value name="Unbuffered" doc="/**
&lt;p&gt;Any buffer in the device is bypassed.&lt;/p&gt;
 */"/>
</enum>
</class>