|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.network.QHttpHeader
com.trolltech.qt.network.QHttpResponseHeader
public class QHttpResponseHeader
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
QHttpResponseHeader()
Constructs an empty HTTP response header. |
|
QHttpResponseHeader(int code)
Equivalent to QHttpResponseHeader(code, QString(), 1, 1). |
|
QHttpResponseHeader(int code,
java.lang.String text)
Equivalent to QHttpResponseHeader(code, text, 1, 1). |
|
QHttpResponseHeader(int code,
java.lang.String text,
int majorVer)
Equivalent to QHttpResponseHeader(code, text, majorVer, 1). |
|
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 | |
---|---|
static QHttpResponseHeader |
fromNativePointer(QNativePointer nativePointer)
This function returns the QHttpResponseHeader instance pointed to by nativePointer |
int |
majorVersion()
Returns the major protocol-version of the HTTP response header. |
int |
minorVersion()
Returns the minor protocol-version of the HTTP response header. |
static QNativePointer |
nativePointerArray(QHttpResponseHeader[] array)
This function returns a QNativePointer that is pointing to the specified QHttpResponseHeader array. |
protected boolean |
parseLine(java.lang.String line,
int number)
This function is reimplemented for internal reasons. |
java.lang.String |
reasonPhrase()
Returns the reason phrase of the HTTP response header. |
void |
setStatusLine(int code)
Equivalent to setStatusLine(code, QString(), 1, 1). |
void |
setStatusLine(int code,
java.lang.String text)
Equivalent to setStatusLine(code, text, 1, 1). |
void |
setStatusLine(int code,
java.lang.String text,
int majorVer)
Equivalent to setStatusLine(code, text, majorVer, 1). |
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()
This function is reimplemented for internal reasons. |
Methods inherited from class com.trolltech.qt.network.QHttpHeader |
---|
addValue, allValues, contentLength, contentType, hasContentLength, hasContentType, hasKey, isValid, keys, parse, removeAllValues, removeValue, setContentLength, setContentType, setValid, setValue, setValues, value, values |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QHttpResponseHeader(int code, java.lang.String text, int majorVer)
Equivalent to QHttpResponseHeader(code, text, majorVer, 1).
public QHttpResponseHeader(int code, java.lang.String text)
Equivalent to QHttpResponseHeader(code, text, 1, 1).
public QHttpResponseHeader(int code)
Equivalent to QHttpResponseHeader(code, QString(), 1, 1).
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.
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.
public QHttpResponseHeader()
Constructs an empty HTTP response header.
public QHttpResponseHeader(QHttpResponseHeader header)
Constructs a copy of header.
Method Detail |
---|
public final java.lang.String reasonPhrase()
Returns the reason phrase of the HTTP response header.
public final void setStatusLine(int code, java.lang.String text, int majorVer)
Equivalent to setStatusLine(code, text, majorVer, 1).
public final void setStatusLine(int code, java.lang.String text)
Equivalent to setStatusLine(code, text, 1, 1).
public final void setStatusLine(int code)
Equivalent to setStatusLine(code, QString(), 1, 1).
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.
public final int statusCode()
Returns the status code of the HTTP response header.
public int majorVersion()
Returns the major protocol-version of the HTTP response header.
majorVersion
in class QHttpHeader
public int minorVersion()
Returns the minor protocol-version of the HTTP response header.
minorVersion
in class QHttpHeader
protected boolean parseLine(java.lang.String line, int number)
This function is reimplemented for internal reasons.
parseLine
in class QHttpHeader
public java.lang.String toString()
This function is reimplemented for internal reasons.
toString
in class QHttpHeader
public static QHttpResponseHeader fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QHttpResponseHeader[] array)
array
- the array that the returned pointer will point to.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |