Sophie

Sophie

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

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

<class name="QXmlInputSource" doc="/**
&lt;p&gt;The &lt;a href=&quot;QXmlInputSource.html#QXmlInputSource(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;QXmlInputSource&lt;/tt&gt;&lt;/a&gt; class provides the input data for the &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt; subclasses.&lt;/p&gt;
&lt;p&gt;All subclasses of &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt; read the input XML document from this class.&lt;/p&gt;
&lt;p&gt;This class recognizes the encoding of the data by reading the encoding declaration in the XML file if it finds one, and reading the data using the corresponding encoding. If it does not find an encoding declaration, then it assumes that the data is either in UTF-8 or UTF-16, depending on whether it can find a byte-order mark.&lt;/p&gt;
&lt;p&gt;There are two ways to populate the input source with data: you can construct it with a &lt;a href=&quot;%2E%2E/core/QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;* so that the input source reads the data from that device. Or you can set the data explicitly with one of the &lt;a href=&quot;QXmlInputSource.html#setData(java.lang.String)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; functions.&lt;/p&gt;
&lt;p&gt;Usually you either construct a &lt;a href=&quot;QXmlInputSource.html#QXmlInputSource(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;QXmlInputSource&lt;/tt&gt;&lt;/a&gt; that works on a &lt;a href=&quot;%2E%2E/core/QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt;* or you construct an empty &lt;a href=&quot;QXmlInputSource.html#QXmlInputSource(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;QXmlInputSource&lt;/tt&gt;&lt;/a&gt; and set the data with &lt;a href=&quot;QXmlInputSource.html#setData(java.lang.String)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;. There are only rare occasions where you would want to mix both methods.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt; subclasses use the &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt; function to read the input character by character. If you want to start from the beginning again, use &lt;a href=&quot;QXmlInputSource.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The functions &lt;a href=&quot;QXmlInputSource.html#data()&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt; are useful if you want to do something with the data other than parsing, e.g&amp;#x2e; displaying the raw XML file. The benefit of using the QXmlInputClass in such cases is that it tries to use the correct encoding.&lt;/p&gt;

@see &lt;a href=&quot;QXmlReader.html&quot;&gt;&lt;tt&gt;QXmlReader&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlSimpleReader.html&quot;&gt;&lt;tt&gt;QXmlSimpleReader&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QXmlInputSource()" doc="/**
&lt;p&gt;Constructs an input source which contains no data.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#setData(java.lang.String)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QXmlInputSource(com.trolltech.qt.core.QIODevice dev)" doc="/**
&lt;p&gt;Constructs an input source and gets the data from device &lt;tt&gt;dev&lt;/tt&gt;. If &lt;tt&gt;dev&lt;/tt&gt; is not open, it is opened in read-only mode. If &lt;tt&gt;dev&lt;/tt&gt; is 0 or it is not possible to read from the device, the input source will contain no data.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#setData(java.lang.String)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/core/QIODevice.html&quot;&gt;&lt;tt&gt;QIODevice&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public java.lang.String data()" doc="/**
&lt;p&gt;Returns the data the input source contains or an empty string if the input source does not contain any data.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#setData(java.lang.String)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#QXmlInputSource(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;QXmlInputSource&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void fetchData()" doc="/**
&lt;p&gt;This function reads more data from the device that was set during construction. If the input source already contained data, this function deletes that data first.&lt;/p&gt;
&lt;p&gt;This object contains no data after a call to this function if the object was constructed without a device to read data from or if this function was not able to get more data from the device.&lt;/p&gt;
&lt;p&gt;There are two occasions where a fetch is done implicitly by another function call: during construction (so that the object starts out with some initial data where available), and during a call to &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt; (if the data had run out).&lt;/p&gt;
&lt;p&gt;You don't normally need to use this function if you use &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#data()&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#QXmlInputSource(com.trolltech.qt.core.QIODevice)&quot;&gt;&lt;tt&gt;QXmlInputSource&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected java.lang.String fromRawData(com.trolltech.qt.core.QByteArray data, boolean beginning)" doc="/**
&lt;p&gt;This function reads the XML file from &lt;tt&gt;data&lt;/tt&gt; and tries to recognize the encoding. It converts the raw data &lt;tt&gt;data&lt;/tt&gt; into a &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt; and returns it. It tries its best to get the correct encoding for the XML file.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;beginning&lt;/tt&gt; is true, this function assumes that the data starts at the beginning of a new XML document and looks for an encoding declaration. If &lt;tt&gt;beginning&lt;/tt&gt; is false, it converts the raw data using the encoding determined from prior calls.&lt;/p&gt;
 */"/>
    <method name="protected final java.lang.String fromRawData(com.trolltech.qt.core.QByteArray data)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QXmlInputSource.html#fromRawData(com.trolltech.qt.core.QByteArray, boolean)&quot;&gt;&lt;tt&gt;fromRawData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;data&lt;/tt&gt;, false). */"/>
    <method name="public char next()" doc="/**
&lt;p&gt;Returns the next character of the input source. If this function reaches the end of available data, it returns QXmlInputSource::EndOfData. If you call &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt; after that, it tries to fetch more data by calling &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt;. If the &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt; call results in new data, this function returns the first character of that data; otherwise it returns QXmlInputSource::EndOfDocument.&lt;/p&gt;
&lt;p&gt;Readers, such as &lt;a href=&quot;QXmlSimpleReader.html&quot;&gt;&lt;tt&gt;QXmlSimpleReader&lt;/tt&gt;&lt;/a&gt;, will assume that the end of the XML document has been reached if the this function returns QXmlInputSource::EndOfDocument, and will check that the supplied input is well-formed. Therefore, when reimplementing this function, it is important to ensure that this behavior is duplicated.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QXmlInputSource.html#fetchData()&quot;&gt;&lt;tt&gt;fetchData&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QXmlSimpleReader::parse&lt;/tt&gt;
@see &lt;tt&gt;QXmlSimpleReader::parseContinue&lt;/tt&gt; */"/>
    <method name="public void reset()" doc="/**
&lt;p&gt;This function sets the position used by &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt; to the beginning of the data returned by &lt;a href=&quot;QXmlInputSource.html#data()&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt;. This is useful if you want to use the input source for more than one parse.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#next()&quot;&gt;&lt;tt&gt;next&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void setData(com.trolltech.qt.core.QByteArray dat)" doc="/**
&lt;p&gt;The data &lt;tt&gt;dat&lt;/tt&gt; is passed through the correct text-codec, before it is set.&lt;/p&gt;
 */"/>
    <method name="public void setData(java.lang.String dat)" doc="/**
&lt;p&gt;Sets the data of the input source to &lt;tt&gt;dat&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If the input source already contains data, this function deletes that data first.&lt;/p&gt;

@see &lt;a href=&quot;QXmlInputSource.html#data()&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static char EndOfData()"/>
    <method name="public native static void setEndOfData(char EndOfData)"/>
    <method name="public native static char EndOfDocument()"/>
    <method name="public native static void setEndOfDocument(char EndOfDocument)"/>
</class>