<class name="QHttpHeader" doc="/**
&lt;p&gt;The &lt;a href=&quot;QHttpHeader.html#QHttpHeader()&quot;&gt;&lt;tt&gt;QHttpHeader&lt;/tt&gt;&lt;/a&gt; class contains header information for HTTP.&lt;/p&gt;
&lt;p&gt;In most cases you should use the more specialized derivatives of this class, &lt;a href=&quot;QHttpResponseHeader.html&quot;&gt;&lt;tt&gt;QHttpResponseHeader&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QHttpRequestHeader.html&quot;&gt;&lt;tt&gt;QHttpRequestHeader&lt;/tt&gt;&lt;/a&gt;, rather than directly using &lt;a href=&quot;QHttpHeader.html#QHttpHeader()&quot;&gt;&lt;tt&gt;QHttpHeader&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QHttpHeader.html#QHttpHeader()&quot;&gt;&lt;tt&gt;QHttpHeader&lt;/tt&gt;&lt;/a&gt; provides the HTTP header fields. A HTTP header field consists of a name followed by a colon, a single space, and the field value. (See RFC 1945.) Field names are case-insensitive. A typical header field looks like this:&lt;/p&gt;
&lt;pre&gt;    content-type: text/html&lt;/pre&gt;
&lt;p&gt;In the API the header field name is called the &amp;quot;key&amp;quot; and the content is called the &amp;quot;value&amp;quot;. You can get and set a header field's value by using its key with &lt;a href=&quot;QHttpHeader.html#value(java.lang.String)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QHttpHeader.html#setValue(java.lang.String, java.lang.String)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;, e.g&amp;#x2e;&lt;/p&gt;
&lt;pre&gt;    header.setValue(&amp;quot;content-type&amp;quot;, &amp;quot;text/html&amp;quot;);
    QString contentType = header.value(&amp;quot;content-type&amp;quot;);&lt;/pre&gt;
&lt;p&gt;Some fields are so common that getters and setters are provided for them as a convenient alternative to using &lt;a href=&quot;QHttpHeader.html#value(java.lang.String)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QHttpHeader.html#setValue(java.lang.String, java.lang.String)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;, e.g&amp;#x2e; &lt;a href=&quot;QHttpHeader.html#contentLength()&quot;&gt;&lt;tt&gt;contentLength&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QHttpHeader.html#contentType()&quot;&gt;&lt;tt&gt;contentType&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QHttpHeader.html#setContentLength(int)&quot;&gt;&lt;tt&gt;setContentLength&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QHttpHeader.html#setContentType(java.lang.String)&quot;&gt;&lt;tt&gt;setContentType&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Each header key has a &lt;i&gt;single&lt;/i&gt; value associated with it. If you set the value for a key which already exists the previous value will be discarded.&lt;/p&gt;

@see &lt;a href=&quot;QHttpRequestHeader.html&quot;&gt;&lt;tt&gt;QHttpRequestHeader&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpResponseHeader.html&quot;&gt;&lt;tt&gt;QHttpResponseHeader&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QHttpHeader(com.trolltech.qt.network.QHttpHeader header)" doc="/**
&lt;p&gt;Constructs a copy of &lt;tt&gt;header&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QHttpHeader(java.lang.String str)" doc="/**
&lt;p&gt;Constructs a HTTP header for &lt;tt&gt;str&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This constructor parses the string &lt;tt&gt;str&lt;/tt&gt; for header fields and adds this information. The &lt;tt&gt;str&lt;/tt&gt; should consist of one or more &amp;quot;\r\n&amp;quot; delimited lines; each of these lines should have the format key, colon, space, value.&lt;/p&gt;
 */"/>
    <method name="public QHttpHeader()" doc="/**
&lt;p&gt;Constructs an empty HTTP header.&lt;/p&gt;
 */"/>
    <method name="public final void addValue(java.lang.String key, java.lang.String value)" doc="/**
&lt;p&gt;Adds a new entry with the &lt;tt&gt;key&lt;/tt&gt; and &lt;tt&gt;value&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final java.util.List&lt;java.lang.String&gt; allValues(java.lang.String key)" doc="/**
&lt;p&gt;Returns all the entries with the given &lt;tt&gt;key&lt;/tt&gt;. If no entry has this &lt;tt&gt;key&lt;/tt&gt;, an empty string list is returned.&lt;/p&gt;
 */"/>
    <method name="public final int contentLength()" doc="/**
&lt;p&gt;Returns the value of the special HTTP header field &lt;tt&gt;content-length&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#setContentLength(int)&quot;&gt;&lt;tt&gt;setContentLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasContentLength()&quot;&gt;&lt;tt&gt;hasContentLength&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String contentType()" doc="/**
&lt;p&gt;Returns the value of the special HTTP header field &lt;tt&gt;content-type&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#setContentType(java.lang.String)&quot;&gt;&lt;tt&gt;setContentType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasContentType()&quot;&gt;&lt;tt&gt;hasContentType&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasContentLength()" doc="/**
&lt;p&gt;Returns true if the header has an entry for the special HTTP header field &lt;tt&gt;content-length&lt;/tt&gt;; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#contentLength()&quot;&gt;&lt;tt&gt;contentLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#setContentLength(int)&quot;&gt;&lt;tt&gt;setContentLength&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasContentType()" doc="/**
&lt;p&gt;Returns true if the header has an entry for the the special HTTP header field &lt;tt&gt;content-type&lt;/tt&gt;; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#contentType()&quot;&gt;&lt;tt&gt;contentType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#setContentType(java.lang.String)&quot;&gt;&lt;tt&gt;setContentType&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean hasKey(java.lang.String key)" doc="/**
&lt;p&gt;Returns true if the HTTP header has an entry with the given &lt;tt&gt;key&lt;/tt&gt;; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#value(java.lang.String)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#setValue(java.lang.String, java.lang.String)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#keys()&quot;&gt;&lt;tt&gt;keys&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isValid()" doc="/**
&lt;p&gt;Returns true if the HTTP header is valid; otherwise returns false.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;QHttpHeader.html#QHttpHeader()&quot;&gt;&lt;tt&gt;QHttpHeader&lt;/tt&gt;&lt;/a&gt; is invalid if it was created by parsing a malformed string.&lt;/p&gt;
 */"/>
    <method name="public final java.util.List&lt;java.lang.String&gt; keys()" doc="/**
&lt;p&gt;Returns a list of the keys in the HTTP header.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#hasKey(java.lang.String)&quot;&gt;&lt;tt&gt;hasKey&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final boolean parse(java.lang.String str)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#toString()&quot;&gt;&lt;tt&gt;toString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeAllValues(java.lang.String key)" doc="/**
&lt;p&gt;Removes all the entries with the key &lt;tt&gt;key&lt;/tt&gt; from the HTTP header.&lt;/p&gt;
 */"/>
    <method name="public final void removeValue(java.lang.String key)" doc="/**
&lt;p&gt;Removes the entry with the key &lt;tt&gt;key&lt;/tt&gt; from the HTTP header.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#value(java.lang.String)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#setValue(java.lang.String, java.lang.String)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setContentLength(int len)" doc="/**
&lt;p&gt;Sets the value of the special HTTP header field &lt;tt&gt;content-length&lt;/tt&gt; to &lt;tt&gt;len&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#contentLength()&quot;&gt;&lt;tt&gt;contentLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasContentLength()&quot;&gt;&lt;tt&gt;hasContentLength&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setContentType(java.lang.String type)" doc="/**
&lt;p&gt;Sets the value of the special HTTP header field &lt;tt&gt;content-type&lt;/tt&gt; to &lt;tt&gt;type&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#contentType()&quot;&gt;&lt;tt&gt;contentType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasContentType()&quot;&gt;&lt;tt&gt;hasContentType&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setValid(boolean arg__1)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#isValid()&quot;&gt;&lt;tt&gt;isValid&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setValue(java.lang.String key, java.lang.String value)" doc="/**
&lt;p&gt;Sets the value of the entry with the &lt;tt&gt;key&lt;/tt&gt; to &lt;tt&gt;value&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If no entry with &lt;tt&gt;key&lt;/tt&gt; exists, a new entry with the given &lt;tt&gt;key&lt;/tt&gt; and &lt;tt&gt;value&lt;/tt&gt; is created. If an entry with the &lt;tt&gt;key&lt;/tt&gt; already exists, the first value is discarded and replaced with the given &lt;tt&gt;value&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#value(java.lang.String)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasKey(java.lang.String)&quot;&gt;&lt;tt&gt;hasKey&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#removeValue(java.lang.String)&quot;&gt;&lt;tt&gt;removeValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setValues(java.lang.String&gt;&gt; values)" doc="/**
&lt;p&gt;Sets the header entries to be the list of key value pairs in &lt;tt&gt;values&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#values()&quot;&gt;&lt;tt&gt;values&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String value(java.lang.String key)" doc="/**
&lt;p&gt;Returns the first value for the entry with the given &lt;tt&gt;key&lt;/tt&gt;. If no entry has this &lt;tt&gt;key&lt;/tt&gt;, an empty string is returned.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#setValue(java.lang.String, java.lang.String)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#removeValue(java.lang.String)&quot;&gt;&lt;tt&gt;removeValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#hasKey(java.lang.String)&quot;&gt;&lt;tt&gt;hasKey&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QHttpHeader.html#keys()&quot;&gt;&lt;tt&gt;keys&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.QPair&lt;java.lang.String, java.lang.String&gt;&gt; values()" doc="/**
&lt;p&gt;Returns all the entries in the header.&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#setValues(java.lang.String&gt;&gt;)&quot;&gt;&lt;tt&gt;setValues&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public abstract int majorVersion()" doc="/**
&lt;p&gt;Returns the major protocol-version of the HTTP header.&lt;/p&gt;
 */"/>
    <method name="public abstract int minorVersion()" doc="/**
&lt;p&gt;Returns the minor protocol-version of the HTTP header.&lt;/p&gt;
 */"/>
    <method name="protected boolean parseLine(java.lang.String line, int number)" doc="/**
&lt;p&gt;&lt;/p&gt;

@see &lt;a href=&quot;QHttpHeader.html#parse(java.lang.String)&quot;&gt;&lt;tt&gt;parse&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public java.lang.String toString()" doc="/**
&lt;p&gt;Returns a string representation of the HTTP header.&lt;/p&gt;
&lt;p&gt;The string is suitable for use by the constructor that takes a &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt;. It consists of lines with the format: key, colon, space, value, &amp;quot;\r\n&amp;quot;.&lt;/p&gt;
 */"/>
</class>
