Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 137

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 16:57:39 CEST 2007 -->
<TITLE>
QIODevice
</TITLE>

<META NAME="keywords" CONTENT="com.trolltech.qt.core.QIODevice class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="QIODevice";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QFSFileEngine.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/core/QIODevice.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QIODevice.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.trolltech.qt.core</FONT>
<BR>
Class QIODevice</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">com.trolltech.qt.core.QObject</A>
              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.core.QIODevice</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/trolltech/qt/network/QAbstractSocket.html" title="class in com.trolltech.qt.network">QAbstractSocket</A>, <A HREF="../../../../com/trolltech/qt/core/QBuffer.html" title="class in com.trolltech.qt.core">QBuffer</A>, <A HREF="../../../../com/trolltech/qt/core/QFile.html" title="class in com.trolltech.qt.core">QFile</A>, <A HREF="../../../../com/trolltech/qt/core/QProcess.html" title="class in com.trolltech.qt.core">QProcess</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>QIODevice</B><DT>extends <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></DL>
</PRE>

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

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

    QByteArray compressed;
    while (gzip.waitForReadyRead())
        compressed += gzip.readAll();</pre>
<p>By subclassing <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>, you can provide the same interface to your own I/O devices. Subclasses of <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> are only required to implement the protected <a href="QIODevice.html#readData(byte[])"><tt>readData</tt></a> and <a href="QIODevice.html#writeData(byte[])"><tt>writeData</tt></a> functions. <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> uses these functions to implement all its convenience functions, such as getChar(), <a href="QIODevice.html#readLine(long)"><tt>readLine</tt></a> and <a href="QIODevice.html#write(com.trolltech.qt.core.QByteArray)"><tt>write</tt></a>. <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> also handles access control for you, so you can safely assume that the device is opened in write mode if <a href="QIODevice.html#writeData(byte[])"><tt>writeData</tt></a> is called.</p>
<p>Some subclasses, such as <a href="QFile.html"><tt>QFile</tt></a> and <a href="%2E%2E/network/QTcpSocket.html"><tt>QTcpSocket</tt></a>, 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, <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> allows you to bypass any buffering by passing the Unbuffered flag to <a href="QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>open</tt></a>. When subclassing <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>, remember to bypass any buffer you may use when the device is open in Unbuffered mode.</p>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><a href="QBuffer.html"><tt>QBuffer</tt></a>, 
<a href="QFile.html"><tt>QFile</tt></a>, 
<a href="%2E%2E/network/QTcpSocket.html"><tt>QTcpSocket</tt></a></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This QFlag class provides flags for the int enum.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenModeFlag.html" title="enum in com.trolltech.qt.core">QIODevice.OpenModeFlag</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This enum is used with <a href="QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>open</tt></a> to describe the mode in which a device is opened.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#aboutToClose">aboutToClose</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted when the device is about to close.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;java.lang.Long&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#bytesWritten">bytesWritten</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted every time a payload of data has been written to the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readyRead">readyRead</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This signal is emitted once every time new data is available for reading from the device.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#QIODevice()">QIODevice</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)">QIODevice</A></B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> object with the given <tt>parent</tt>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#atEnd()">atEnd</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the current read and write position is at the end of the device (i.e&#x2e; there is no more data available for reading on the device); otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#bytesAvailable()">bytesAvailable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that are available for reading.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#bytesToWrite()">bytesToWrite</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For buffered devices, this function returns the number of bytes waiting to be written.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#canReadLine()">canReadLine</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if a complete line of data can be read from the device; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#close()">close</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;First emits <a href="QIODevice.html#aboutToClose()"><tt>aboutToClose</tt></a>, then closes the device and sets its OpenMode to <a href="QIODevice.html#OpenModeFlag-enum"><tt>NotOpen</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#errorString()">errorString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a human-readable description of the last device error that occurred.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/core/QIODevice.html" title="class in com.trolltech.qt.core">QIODevice</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function returns the QIODevice instance pointed to by nativePointer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#getByte()">getByte</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a byte from the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#isOpen()">isOpen</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the device is open; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#isReadable()">isReadable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if data can be read from the device; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#isSequential()">isSequential</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this device is sequential; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#isTextModeEnabled()">isTextModeEnabled</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag is enabled; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#isWritable()">isWritable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if data can be written to the device; otherwise returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)">open</A></B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A>&nbsp;mode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens the device and sets its OpenMode to <tt>mode</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenModeFlag...)">open</A></B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenModeFlag.html" title="enum in com.trolltech.qt.core">QIODevice.OpenModeFlag</A>...&nbsp;mode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Opens the device and sets its OpenMode to <tt>mode</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#openMode()">openMode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the mode in which the device has been opened; i.e&#x2e; <a href="QIODevice.html#OpenModeFlag-enum"><tt>ReadOnly</tt></a> or <a href="QIODevice.html#OpenModeFlag-enum"><tt>WriteOnly</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#peek(byte[])">peek</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads from the device into <tt>data</tt>, without side
effects (i.e., if you call read() after peek(), you will get the same
data).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#peek(long)">peek</A></B>(long&nbsp;maxlen)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peeks at most <tt>maxlen</tt> bytes from the device, returning the data peeked as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#pos()">pos</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For random-access devices, this function returns the position that data is written to or read from.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#putByte(byte)">putByte</A></B>(byte&nbsp;c)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the character <tt>c</tt> to the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#read(byte[])">read</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads from the device into <tt>data</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#read(long)">read</A></B>(long&nbsp;maxlen)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads at most <tt>maxlen</tt> bytes from the device, and returns the data read as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readAll()">readAll</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads all available data from the device, and returns it as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readData(byte[])">readData</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QIODevice.html#readData(byte[])"><tt>readData</tt></a>(<tt>data</tt>, ).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readLine()">readLine</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QIODevice.html#readLine(long)"><tt>readLine</tt></a>(0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readLine(byte[])">readLine</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This functions reads a line of ASCII characters from the device (the maximum
characters read is the length of <tt>data</tt>).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readLine(long)">readLine</A></B>(long&nbsp;maxlen)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a line from the device, but no more than <tt>maxlen</tt> characters, and returns the result as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#readLineData(byte[])">readLineData</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QIODevice.html#readLineData(byte[])"><tt>readLineData</tt></a>(<tt>data</tt>, ).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#reset()">reset</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Seeks to the start of input for random-access devices.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#seek(long)">seek</A></B>(long&nbsp;pos)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For random-access devices, this function sets the current position to <tt>pos</tt>, returning true on success, or false if an error occurred.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#setErrorString(java.lang.String)">setErrorString</A></B>(java.lang.String&nbsp;errorString)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the human readable description of the last device error that occurred to <tt>errorString</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)">setOpenMode</A></B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A>&nbsp;openMode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the OpenMode of the device to <tt>openMode</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenModeFlag...)">setOpenMode</A></B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenModeFlag.html" title="enum in com.trolltech.qt.core">QIODevice.OpenModeFlag</A>...&nbsp;openMode)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the OpenMode of the device to <tt>openMode</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#setTextModeEnabled(boolean)">setTextModeEnabled</A></B>(boolean&nbsp;enabled)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <tt>enabled</tt> is true, this function sets the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag on the device; otherwise the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag is removed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#size()">size</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For open random-access devices, this function returns the size of the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#ungetByte(byte)">ungetByte</A></B>(byte&nbsp;c)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts the character <tt>c</tt> back into the device, and decrements the current position unless the position is 0.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#waitForBytesWritten(int)">waitForBytesWritten</A></B>(int&nbsp;msecs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For buffered devices, this function waits until a payload of buffered written data has been written to the device and the <a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> signal has been emitted, or until <tt>msecs</tt> milliseconds have passed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#waitForReadyRead(int)">waitForReadyRead</A></B>(int&nbsp;msecs)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blocks until data is available for reading and the <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> signal has been emitted, or until <tt>msecs</tt> milliseconds have passed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#write(byte[])">write</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes <tt>data</tt> to the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#write(com.trolltech.qt.core.QByteArray)">write</A></B>(<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A>&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the content of <tt>data</tt> to the device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QIODevice.html#writeData(byte[])">writeData</A></B>(byte[]&nbsp;data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QIODevice.html#writeData(byte[])"><tt>writeData</tt></a>(<tt>data</tt>, ).</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.core.QObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.core.<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#childEvent(com.trolltech.qt.core.QChildEvent)">childEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#children()">children</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#connectSlotsByName()">connectSlotsByName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#customEvent(com.trolltech.qt.core.QEvent)">customEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#disposeLater()">disposeLater</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectInfo()">dumpObjectInfo</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectTree()">dumpObjectTree</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dynamicPropertyNames()">dynamicPropertyNames</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#event(com.trolltech.qt.core.QEvent)">event</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#eventFilter(com.trolltech.qt.core.QObject, com.trolltech.qt.core.QEvent)">eventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild()">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class, java.lang.String)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren()">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, com.trolltech.qt.core.QRegExp)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, java.lang.String)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#installEventFilter(com.trolltech.qt.core.QObject)">installEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#isWidgetType()">isWidgetType</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#killTimer(int)">killTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#moveToThread(java.lang.Thread)">moveToThread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#objectName()">objectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#parent()">parent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#property(java.lang.String)">property</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#removeEventFilter(com.trolltech.qt.core.QObject)">removeEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setObjectName(java.lang.String)">setObjectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setParent(com.trolltech.qt.core.QObject)">setParent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#startTimer(int)">startTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#thread()">thread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#timerEvent(com.trolltech.qt.core.QTimerEvent)">timerEvent</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="aboutToClose"><!-- --></A><H3>
aboutToClose</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A> <B>aboutToClose</B></PRE>
<DL>
<DD><p>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&#x2e;, if you have data in a separate buffer that needs to be written to the device).</p>
<dl>
<dt><b>Compatible Slot Signature:</b></dt>
<dd><tt>void mySlot()</tt></dd>
</dl>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="bytesWritten"><!-- --></A><H3>
bytesWritten</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;java.lang.Long&gt; <B>bytesWritten</B></PRE>
<DL>
<DD><p>This signal is emitted every time a payload of data has been written to the device. The <tt>bytes</tt> argument is set to the number of bytes that were written in this payload.</p>
<p><a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> is not emitted recursively; if you reenter the event loop or call <a href="QIODevice.html#waitForBytesWritten(int)"><tt>waitForBytesWritten</tt></a> inside a slot connected to the <a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> signal, the signal will not be reemitted (although <a href="QIODevice.html#waitForBytesWritten(int)"><tt>waitForBytesWritten</tt></a> may still return true).</p>
<dl>
<dt><b>Compatible Slot Signatures:</b></dt>
<dd><tt>void mySlot(long bytes)</tt></dd>
<dd><tt>void mySlot()</tt></dd>
</dl>
<dl>
<dt><b>See Also:</b></dt>
<dd><a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a></dd>
</dl>
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="readyRead"><!-- --></A><H3>
readyRead</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A> <B>readyRead</B></PRE>
<DL>
<DD><p>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.</p>
<p><a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> is not emitted recursively; if you reenter the event loop or call <a href="QIODevice.html#waitForReadyRead(int)"><tt>waitForReadyRead</tt></a> inside a slot connected to the <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> signal, the signal will not be reemitted (although <a href="QIODevice.html#waitForReadyRead(int)"><tt>waitForReadyRead</tt></a> may still return true).</p>
<dl>
<dt><b>Compatible Slot Signature:</b></dt>
<dd><tt>void mySlot()</tt></dd>
</dl>
<dl>
<dt><b>See Also:</b></dt>
<dd><a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a></dd>
</dl>
<P>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="QIODevice()"><!-- --></A><H3>
QIODevice</H3>
<PRE>
public <B>QIODevice</B>()</PRE>
<DL>
<DD><p>Constructs a <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> object.</p>
<P>
</DL>
<HR>

<A NAME="QIODevice(com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QIODevice</H3>
<PRE>
public <B>QIODevice</B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> object with the given <tt>parent</tt>.</p>
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="errorString()"><!-- --></A><H3>
errorString</H3>
<PRE>
public final java.lang.String <B>errorString</B>()</PRE>
<DL>
<DD><p>Returns a human-readable description of the last device error that occurred.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#setErrorString(java.lang.String)"><tt>setErrorString</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isOpen()"><!-- --></A><H3>
isOpen</H3>
<PRE>
public final boolean <B>isOpen</B>()</PRE>
<DL>
<DD><p>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 <a href="QIODevice.html#openMode()"><tt>openMode</tt></a> returns <tt>NotOpen</tt>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="isReadable()"><!-- --></A><H3>
isReadable</H3>
<PRE>
public final boolean <B>isReadable</B>()</PRE>
<DL>
<DD><p>Returns true if data can be read from the device; otherwise returns false. Use <a href="QIODevice.html#bytesAvailable()"><tt>bytesAvailable</tt></a> to determine how many bytes can be read.</p>
<p>This is a convenience function which checks if the OpenMode of the device contains the <a href="QIODevice.html#OpenModeFlag-enum"><tt>ReadOnly</tt></a> flag.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="isTextModeEnabled()"><!-- --></A><H3>
isTextModeEnabled</H3>
<PRE>
public final boolean <B>isTextModeEnabled</B>()</PRE>
<DL>
<DD><p>Returns true if the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag is enabled; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#setTextModeEnabled(boolean)"><tt>setTextModeEnabled</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isWritable()"><!-- --></A><H3>
isWritable</H3>
<PRE>
public final boolean <B>isWritable</B>()</PRE>
<DL>
<DD><p>Returns true if data can be written to the device; otherwise returns false.</p>
<p>This is a convenience function which checks if the OpenMode of the device contains the <a href="QIODevice.html#OpenModeFlag-enum"><tt>WriteOnly</tt></a> flag.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="openMode()"><!-- --></A><H3>
openMode</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A> <B>openMode</B>()</PRE>
<DL>
<DD><p>Returns the mode in which the device has been opened; i.e&#x2e; <a href="QIODevice.html#OpenModeFlag-enum"><tt>ReadOnly</tt></a> or <a href="QIODevice.html#OpenModeFlag-enum"><tt>WriteOnly</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>setOpenMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="peek(long)"><!-- --></A><H3>
peek</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A> <B>peek</B>(long&nbsp;maxlen)</PRE>
<DL>
<DD><p>Peeks at most <tt>maxlen</tt> bytes from the device, returning the data peeked as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</p>
<p>Example:</p>
<pre>    bool isExeFile(QFile *file)
    {
        return file-&gt;peek(2) == &quot;MZ&quot;;
    }</pre>
<p>This function has no way of reporting errors; returning an empty <a href="%2E%2E/porting4.html#qbytearray"><tt>QByteArray</tt></a> can mean either that no data was currently available for peeking, or that an error occurred.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#read(long)"><tt>read</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="putByte(byte)"><!-- --></A><H3>
putByte</H3>
<PRE>
public final boolean <B>putByte</B>(byte&nbsp;c)</PRE>
<DL>
<DD><p>Writes the character <tt>c</tt> to the device. Returns true on success; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#write(com.trolltech.qt.core.QByteArray)"><tt>write</tt></a>, 
<tt>getChar</tt>, 
<tt>ungetChar</tt></DL>
</DD>
</DL>
<HR>

<A NAME="read(long)"><!-- --></A><H3>
read</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A> <B>read</B>(long&nbsp;maxlen)</PRE>
<DL>
<DD><p>Reads at most <tt>maxlen</tt> bytes from the device, and returns the data read as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</p>
<p>This function has no way of reporting errors; returning an empty <a href="%2E%2E/porting4.html#qbytearray"><tt>QByteArray</tt></a> can mean either that no data was currently available for reading, or that an error occurred.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readAll()"><!-- --></A><H3>
readAll</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A> <B>readAll</B>()</PRE>
<DL>
<DD><p>Reads all available data from the device, and returns it as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</p>
<p>This function has no way of reporting errors; returning an empty <a href="%2E%2E/porting4.html#qbytearray"><tt>QByteArray</tt></a> can mean either that no data was currently available for reading, or that an error occurred.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readLine()"><!-- --></A><H3>
readLine</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A> <B>readLine</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QIODevice.html#readLine(long)"><tt>readLine</tt></a>(0).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readLine(long)"><!-- --></A><H3>
readLine</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A> <B>readLine</B>(long&nbsp;maxlen)</PRE>
<DL>
<DD><p>Reads a line from the device, but no more than <tt>maxlen</tt> characters, and returns the result as a <a href="QByteArray.html"><tt>QByteArray</tt></a>.</p>
<p>This function has no way of reporting errors; returning an empty <a href="%2E%2E/porting4.html#qbytearray"><tt>QByteArray</tt></a> can mean either that no data was currently available for reading, or that an error occurred.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setErrorString(java.lang.String)"><!-- --></A><H3>
setErrorString</H3>
<PRE>
protected final void <B>setErrorString</B>(java.lang.String&nbsp;errorString)</PRE>
<DL>
<DD><p>Sets the human readable description of the last device error that occurred to <tt>errorString</tt>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#errorString()"><tt>errorString</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setOpenMode(com.trolltech.qt.core.QIODevice.OpenModeFlag...)"><!-- --></A><H3>
setOpenMode</H3>
<PRE>
protected final void <B>setOpenMode</B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenModeFlag.html" title="enum in com.trolltech.qt.core">QIODevice.OpenModeFlag</A>...&nbsp;openMode)</PRE>
<DL>
<DD><p>Sets the OpenMode of the device to <tt>openMode</tt>. Call this function to set the open mode when reimplementing <a href="QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>open</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)"><!-- --></A><H3>
setOpenMode</H3>
<PRE>
protected final void <B>setOpenMode</B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A>&nbsp;openMode)</PRE>
<DL>
<DD><p>Sets the OpenMode of the device to <tt>openMode</tt>. Call this function to set the open mode when reimplementing <a href="QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>open</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="setTextModeEnabled(boolean)"><!-- --></A><H3>
setTextModeEnabled</H3>
<PRE>
public final void <B>setTextModeEnabled</B>(boolean&nbsp;enabled)</PRE>
<DL>
<DD><p>If <tt>enabled</tt> is true, this function sets the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag on the device; otherwise the <a href="QIODevice.html#OpenModeFlag-enum">Text</tt></a> flag is removed. This feature is useful for classes that provide custom end-of-line handling on a <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#isTextModeEnabled()"><tt>isTextModeEnabled</tt></a>, 
<a href="QIODevice.html#open(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>open</tt></a>, 
<a href="QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>setOpenMode</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="ungetByte(byte)"><!-- --></A><H3>
ungetByte</H3>
<PRE>
public final void <B>ungetByte</B>(byte&nbsp;c)</PRE>
<DL>
<DD><p>Puts the character <tt>c</tt> back into the device, and decrements the current position unless the position is 0. This function is usually called to &quot;undo&quot; a getChar() operation, such as when writing a backtracking parser.</p>
<p>If <tt>c</tt> was not previously read from the device, the behavior is undefined.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="write(com.trolltech.qt.core.QByteArray)"><!-- --></A><H3>
write</H3>
<PRE>
public final long <B>write</B>(<A HREF="../../../../com/trolltech/qt/core/QByteArray.html" title="class in com.trolltech.qt.core">QByteArray</A>&nbsp;data)</PRE>
<DL>
<DD><p>Writes the content of <tt>data</tt> to the device. Returns the number of bytes that were actually written, or -1 if an error occurred.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#read(long)"><tt>read</tt></a>, 
<a href="QIODevice.html#writeData(byte[])"><tt>writeData</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="atEnd()"><!-- --></A><H3>
atEnd</H3>
<PRE>
public boolean <B>atEnd</B>()</PRE>
<DL>
<DD><p>Returns true if the current read and write position is at the end of the device (i.e&#x2e; there is no more data available for reading on the device); otherwise returns false.</p>
<p>For some devices, <a href="QIODevice.html#atEnd()"><tt>atEnd</tt></a> 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 <a href="QIODevice.html#read(long)"><tt>read</tt></a> (e.g&#x2e;, <tt>/dev</tt> or <tt>/proc</tt> files on Unix and Mac OS X, or console input / <tt>stdin</tt> on all platforms).</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#bytesAvailable()"><tt>bytesAvailable</tt></a>, 
<a href="QIODevice.html#read(long)"><tt>read</tt></a>, 
<a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="bytesAvailable()"><!-- --></A><H3>
bytesAvailable</H3>
<PRE>
public long <B>bytesAvailable</B>()</PRE>
<DL>
<DD><p>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.</p>
<p>Subclasses that reimplement this function must call the base implementation in order to include the size of QIODevices' buffer. Example:</p>
<pre>    qint64 CustomDevice::bytesAvailable() const
    {
        return buffer.size() + QIODevice::bytesAvailable();
    }</pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#bytesToWrite()"><tt>bytesToWrite</tt></a>, 
<a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a>, 
<a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="bytesToWrite()"><!-- --></A><H3>
bytesToWrite</H3>
<PRE>
public long <B>bytesToWrite</B>()</PRE>
<DL>
<DD><p>For buffered devices, this function returns the number of bytes waiting to be written. For devices with no buffer, this function returns 0.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#bytesAvailable()"><tt>bytesAvailable</tt></a>, 
<a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a>, 
<a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="canReadLine()"><!-- --></A><H3>
canReadLine</H3>
<PRE>
public boolean <B>canReadLine</B>()</PRE>
<DL>
<DD><p>Returns true if a complete line of data can be read from the device; otherwise returns false.</p>
<p>Note that unbuffered devices, which have no way of determining what can be read, always return false.</p>
<p>This function is often called in conjunction with the <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> signal.</p>
<p>Subclasses that reimplement this function must call the base implementation in order to include the size of the <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>'s buffer. Example:</p>
<pre>    bool CustomDevice::canReadLine() const
    {
        return buffer.contains('\n') || QIODevice::canReadLine();
    }</pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a>, 
<a href="QIODevice.html#readLine(long)"><tt>readLine</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()</PRE>
<DL>
<DD><p>First emits <a href="QIODevice.html#aboutToClose()"><tt>aboutToClose</tt></a>, then closes the device and sets its OpenMode to <a href="QIODevice.html#OpenModeFlag-enum"><tt>NotOpen</tt></a>. The error string is also reset.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#setOpenMode(com.trolltech.qt.core.QIODevice.OpenMode)"><tt>setOpenMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="isSequential()"><!-- --></A><H3>
isSequential</H3>
<PRE>
public boolean <B>isSequential</B>()</PRE>
<DL>
<DD><p>Returns true if this device is sequential; otherwise returns false.</p>
<p>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.</p>
<p>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.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#bytesAvailable()"><tt>bytesAvailable</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="open(com.trolltech.qt.core.QIODevice.OpenModeFlag...)"><!-- --></A><H3>
open</H3>
<PRE>
public final boolean <B>open</B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenModeFlag.html" title="enum in com.trolltech.qt.core">QIODevice.OpenModeFlag</A>...&nbsp;mode)</PRE>
<DL>
<DD>Opens the device and sets its OpenMode to <tt>mode</tt>. Returns true if successful;
otherwise returns false.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="open(com.trolltech.qt.core.QIODevice.OpenMode)"><!-- --></A><H3>
open</H3>
<PRE>
public boolean <B>open</B>(<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core">QIODevice.OpenMode</A>&nbsp;mode)</PRE>
<DL>
<DD><p>Opens the device and sets its OpenMode to <tt>mode</tt>. Returns true if successful; otherwise returns false.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#openMode()"><tt>openMode</tt></a>, 
<tt>OpenMode</tt></DL>
</DD>
</DL>
<HR>

<A NAME="pos()"><!-- --></A><H3>
pos</H3>
<PRE>
public long <B>pos</B>()</PRE>
<DL>
<DD><p>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 &quot;current position&quot;, 0 is returned.</p>
<p>The current read/write position of the device is maintained internally by <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>, so reimplementing this function is not necessary. When subclassing <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>, use QIODevice::seek() to notify <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a> about changes in the device position.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a>, 
<a href="QIODevice.html#seek(long)"><tt>seek</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="readData(byte[])"><!-- --></A><H3>
readData</H3>
<PRE>
protected abstract int <B>readData</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD><p>Equivalent to <a href="QIODevice.html#readData(byte[])"><tt>readData</tt></a>(<tt>data</tt>, ).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readLineData(byte[])"><!-- --></A><H3>
readLineData</H3>
<PRE>
protected int <B>readLineData</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD><p>Equivalent to <a href="QIODevice.html#readLineData(byte[])"><tt>readLineData</tt></a>(<tt>data</tt>, ).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public boolean <B>reset</B>()</PRE>
<DL>
<DD><p>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).</p>
<p>Note that when using a <a href="QTextStream.html"><tt>QTextStream</tt></a> on a <a href="QFile.html"><tt>QFile</tt></a>, calling <a href="QIODevice.html#reset()"><tt>reset</tt></a> on the <a href="QFile.html"><tt>QFile</tt></a> will not have the expected result because <a href="QTextStream.html"><tt>QTextStream</tt></a> buffers the file. Use the QTextStream::seek() function instead.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#seek(long)"><tt>seek</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="seek(long)"><!-- --></A><H3>
seek</H3>
<PRE>
public boolean <B>seek</B>(long&nbsp;pos)</PRE>
<DL>
<DD><p>For random-access devices, this function sets the current position to <tt>pos</tt>, returning true on success, or false if an error occurred. For sequential devices, the default behavior is to do nothing and return false.</p>
<p>When subclassing <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>, you must call QIODevice::seek() at the start of your function to ensure integrity with <a href="QIODevice.html#QIODevice(com.trolltech.qt.core.QObject)"><tt>QIODevice</tt></a>'s built-in buffer. The base implementation always returns true.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#pos()"><tt>pos</tt></a>, 
<a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public long <B>size</B>()</PRE>
<DL>
<DD><p>For open random-access devices, this function returns the size of the device. For open sequential devices, <a href="QIODevice.html#bytesAvailable()"><tt>bytesAvailable</tt></a> is returned.</p>
<p>If the device is closed, the size returned will not reflect the actual size of the device.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#isSequential()"><tt>isSequential</tt></a>, 
<a href="QIODevice.html#pos()"><tt>pos</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="waitForBytesWritten(int)"><!-- --></A><H3>
waitForBytesWritten</H3>
<PRE>
public boolean <B>waitForBytesWritten</B>(int&nbsp;msecs)</PRE>
<DL>
<DD><p>For buffered devices, this function waits until a payload of buffered written data has been written to the device and the <a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> signal has been emitted, or until <tt>msecs</tt> milliseconds have passed. If msecs is -1, this function will not time out. For unbuffered devices, it returns immediately.</p>
<p>Returns true if a payload of data was written to the device; otherwise returns false (i.e&#x2e; if the operation timed out, or if an error occurred).</p>
<p>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.</p>
<p>If called from within a slot connected to the <a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> signal, <a href="QIODevice.html#bytesWritten(long)"><tt>bytesWritten</tt></a> will not be reemitted.</p>
<p>Reimplement this function to provide a blocking API for a custom device. The default implementation does nothing, and returns false.</p>
<p><b>Warning:</b> Calling this function from the main (GUI) thread might cause your user interface to freeze.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#waitForReadyRead(int)"><tt>waitForReadyRead</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="waitForReadyRead(int)"><!-- --></A><H3>
waitForReadyRead</H3>
<PRE>
public boolean <B>waitForReadyRead</B>(int&nbsp;msecs)</PRE>
<DL>
<DD><p>Blocks until data is available for reading and the <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> signal has been emitted, or until <tt>msecs</tt> milliseconds have passed. If msecs is -1, this function will not time out.</p>
<p>Returns true if data is available for reading; otherwise returns false (if the operation timed out or if an error occurred).</p>
<p>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.</p>
<p>If called from within a slot connected to the <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> signal, <a href="QIODevice.html#readyRead()"><tt>readyRead</tt></a> will not be reemitted.</p>
<p>Reimplement this function to provide a blocking API for a custom device. The default implementation does nothing, and returns false.</p>
<p><b>Warning:</b> Calling this function from the main (GUI) thread might cause your user interface to freeze.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QIODevice.html#waitForBytesWritten(int)"><tt>waitForBytesWritten</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="writeData(byte[])"><!-- --></A><H3>
writeData</H3>
<PRE>
protected abstract int <B>writeData</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD><p>Equivalent to <a href="QIODevice.html#writeData(byte[])"><tt>writeData</tt></a>(<tt>data</tt>, ).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3>
fromNativePointer</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/core/QIODevice.html" title="class in com.trolltech.qt.core">QIODevice</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</PRE>
<DL>
<DD>This function returns the QIODevice instance pointed to by nativePointer
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL>
</DD>
</DL>
<HR>

<A NAME="getByte()"><!-- --></A><H3>
getByte</H3>
<PRE>
public final int <B>getByte</B>()</PRE>
<DL>
<DD>Gets a byte from the device.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>-1 on failure, or the value of the byte on success</DL>
</DD>
</DL>
<HR>

<A NAME="peek(byte[])"><!-- --></A><H3>
peek</H3>
<PRE>
public final int <B>peek</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Reads from the device into <tt>data</tt>, without side
effects (i.e., if you call read() after peek(), you will get the same
data).  Returns the number of bytes read. If an error occurs, such as
when attempting to peek a device opened in WriteOnly mode, this function
returns -1.
<p>
0 is returned when no more data is available for reading.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="read(byte[])"><!-- --></A><H3>
read</H3>
<PRE>
public final int <B>read</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Reads from the device into <tt>data</tt>. Returns the number of bytes read. If
an error occurs, such as when attempting to peek a device opened in WriteOnly
mode, this function returns -1. 
<p> 
0 is returned when no more data is available for reading.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="readLine(byte[])"><!-- --></A><H3>
readLine</H3>
<PRE>
public final int <B>readLine</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>This functions reads a line of ASCII characters from the device (the maximum
characters read is the length of <tt>data</tt>). The data is placed in
<tt>data</tt>. It returns -1 if an error occurs.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public final int <B>write</B>(byte[]&nbsp;data)</PRE>
<DL>
<DD>Writes <tt>data</tt> to the device. Returns the number of bytes that were
actually written, or -1 if an error occurred.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QFSFileEngine.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QIODevice.OpenMode.html" title="class in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/core/QIODevice.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QIODevice.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>