com.trolltech.qt.network
Class QHttpResponseHeader

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.network.QHttpHeader
                  extended by com.trolltech.qt.network.QHttpResponseHeader
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QHttpResponseHeader
extends QHttpHeader
implements java.lang.Cloneable

The QHttpResponseHeader class contains response header information for HTTP. This class is used by the QHttp class to report the header information that the client received from the server.

HTTP responses have a status code that indicates the status of the response. This code is a 3-digit integer result code (for details see to RFC 1945). In addition to the status code, you can also specify a human-readable text that describes the reason for the code ("reason phrase"). This class allows you to get the status code and the reason phrase.

See also:
QHttpRequestHeader, QHttp, and HTTP Example.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QHttpResponseHeader()
          Constructs an empty HTTP response header.
QHttpResponseHeader(int code)
          Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
QHttpResponseHeader(int code, java.lang.String text)
          Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
QHttpResponseHeader(int code, java.lang.String text, int majorVer)
          Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
QHttpResponseHeader(int code, java.lang.String text, int majorVer, int minorVer)
          Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
QHttpResponseHeader(QHttpResponseHeader header)
          Constructs a copy of header.
QHttpResponseHeader(java.lang.String str)
          Constructs a HTTP response header from the string str.
 
Method Summary
 QHttpResponseHeader clone()
          This method is reimplemented for internal reasons
 java.lang.String reasonPhrase()
          Returns the reason phrase of the HTTP response header.
 void setStatusLine(int code)
          Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
 void setStatusLine(int code, java.lang.String text)
          Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
 void setStatusLine(int code, java.lang.String text, int majorVer)
          Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
 void setStatusLine(int code, java.lang.String text, int majorVer, int minorVer)
          Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.
 int statusCode()
          Returns the status code of the HTTP response header.
 java.lang.String toString()
          Returns a string representation of the this QHttpResponseHeader.
 
Methods inherited from class com.trolltech.qt.network.QHttpHeader
addValue, allValues, contentLength, contentType, hasContentLength, hasContentType, hasKey, isValid, keys, majorVersion, minorVersion, removeAllValues, removeValue, setContentLength, setContentType, setValue, setValues, value, values
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QHttpResponseHeader

public QHttpResponseHeader()
Constructs an empty HTTP response header.


QHttpResponseHeader

public QHttpResponseHeader(QHttpResponseHeader header)
Constructs a copy of header.


QHttpResponseHeader

public QHttpResponseHeader(java.lang.String str)
Constructs a HTTP response header from the string str. The string is parsed and the information is set. The str should consist of one or more "\r\n" delimited lines; the first line should be the status-line (format: HTTP-version, space, status-code, space, reason-phrase); each of remaining lines should have the format key, colon, space, value.


QHttpResponseHeader

public QHttpResponseHeader(int code,
                           java.lang.String text,
                           int majorVer)
Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


QHttpResponseHeader

public QHttpResponseHeader(int code,
                           java.lang.String text)
Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


QHttpResponseHeader

public QHttpResponseHeader(int code)
Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


QHttpResponseHeader

public QHttpResponseHeader(int code,
                           java.lang.String text,
                           int majorVer,
                           int minorVer)
Constructs a QHttpResponseHeader, setting the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().

Method Detail

reasonPhrase

public final java.lang.String reasonPhrase()
Returns the reason phrase of the HTTP response header.

See also:
statusCode(), majorVersion(), and minorVersion().


setStatusLine

public final void setStatusLine(int code,
                                java.lang.String text,
                                int majorVer)
Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


setStatusLine

public final void setStatusLine(int code,
                                java.lang.String text)
Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


setStatusLine

public final void setStatusLine(int code)
Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


setStatusLine

public final void setStatusLine(int code,
                                java.lang.String text,
                                int majorVer,
                                int minorVer)
Sets the status code to code, the reason phrase to text and the protocol-version to majorVer and minorVer.

See also:
statusCode(), reasonPhrase(), majorVersion(), and minorVersion().


statusCode

public final int statusCode()
Returns the status code of the HTTP response header.

See also:
reasonPhrase(), majorVersion(), and minorVersion().


toString

public java.lang.String toString()
Returns a string representation of the this QHttpResponseHeader.

Overrides:
toString in class QHttpHeader

clone

public QHttpResponseHeader clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object