org.apache.http.HttpResponse that can be used to release client connection
associated with the original response.
| Modifier and Type | Field and Description |
|---|---|
| private final ConnectionHolder | |
| private final HttpResponse |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addHeader(final Header
the header to append. header)Implements org. |
| public void | addHeader(final String
the name of the header. name, final String the value of the header. value)Implements org. |
| public void | close()
Implements java. |
| public boolean | containsHeader(final String
the header name to check for. name)Implements org. |
| public Header[] | getAllHeaders()
Implements org. |
| public HttpEntity | getEntity()
Implements org. |
| public Header | getFirstHeader(final String
the name of the header to return. name)Implements org. |
| public Header[] | getHeaders(final String
the name of the headers to return. name)Implements org. |
| public Header | getLastHeader(final String
the name of the header to return. name)Implements org. |
| public Locale | |
| public HttpParams | getParams()
Implements org.
Deprecated
as a consequence of
Returns the parameters effective for this message as set by
HttpParams being deprecated.
setParams(HttpParams).
|
| public ProtocolVersion | getProtocolVersion()
Implements org. |
| public StatusLine | getStatusLine()
Implements org. |
| public HeaderIterator | headerIterator()
Implements org. |
| public HeaderIterator | headerIterator(final String
the name of the headers over which to iterate, or
name)null for all headersImplements org. |
| public void | removeHeader(final Header
the header to remove. header)Implements org. |
| public void | removeHeaders(final String
The name of the headers to remove. name)Implements org. |
| public void | setEntity(final HttpEntity
the entity to associate with this response, or
entity)null to unsetImplements org. |
| public void | setHeader(final Header
the header to set. header)Implements org. |
| public void | setHeader(final String
the name of the header. name, final String the value of the header. value)Implements org. |
| public void | setHeaders(final Header[]
the array of headers to set. headers)Implements org. |
| public void | setLocale(final Locale
the new locale loc)Implements org. |
| public void | setParams(final HttpParams
the parameters params)Implements org.
Deprecated
as a consequence of
Provides parameters to be used for the processing of this message.
HttpParams being deprecated.
|
| public void | setReasonPhrase(final String
the new reason phrase as a single-line string, or
reason)null to unset the reason phraseImplements org. |
| public void | setStatusCode(final int
the HTTP status code. code)Implements org. |
| public void | setStatusLine(final StatusLine
the status line of this response statusline)Implements org. |
| public void | setStatusLine(final ProtocolVersion
the HTTP version ver, final int the status code code)Implements org. |
| public void | setStatusLine(final ProtocolVersion
the HTTP version ver, final int the status code code, final String the reason phrase, or reason)null to omitImplements org. |
| public String |
| connHolder | back to summary |
|---|---|
| private final ConnectionHolder connHolder | |
| original | back to summary |
|---|---|
| private final HttpResponse original | |
| HttpResponseProxy | back to summary |
|---|---|
| public HttpResponseProxy(final HttpResponse original, final ConnectionHolder connHolder) | |
| addHeader | back to summary |
|---|---|
| public void addHeader(final Header header) Implements org. Doc from org. Adds a header to this message. The header will be appended to the end of the list. | |
| addHeader | back to summary |
|---|---|
| public void addHeader(final String name, final String value) Implements org. Doc from org. Adds a header to this message. The header will be appended to the end of the list. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| containsHeader | back to summary |
|---|---|
| public boolean containsHeader(final String name) Implements org. Doc from org. Checks if a certain header is present in this message. Header values are ignored. | |
| getAllHeaders | back to summary |
|---|---|
| public Header[] getAllHeaders() Implements org. Doc from org. Returns all the headers of this message. Headers are orderd in the sequence they will be sent over a connection. | |
| getEntity | back to summary |
|---|---|
| public HttpEntity getEntity() Implements org. Doc from org. Obtains the message entity of this response, if any.
The entity is provided by calling
| |
| getFirstHeader | back to summary |
|---|---|
| public Header getFirstHeader(final String name) Implements org. Doc from org. Returns the first header with a specified name of this message. Header
values are ignored. If there is more than one matching header in the
message the first element of | |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders(final String name) Implements org. Doc from org. Returns all the headers with a specified name of this message. Header values are ignored. Headers are orderd in the sequence they will be sent over a connection. | |
| getLastHeader | back to summary |
|---|---|
| public Header getLastHeader(final String name) Implements org. Doc from org. Returns the last header with a specified name of this message. Header values
are ignored. If there is more than one matching header in the message the
last element of | |
| getLocale | back to summary |
|---|---|
| public Locale getLocale() Implements org. Doc from org. Obtains the locale of this response.
The locale is used to determine the reason phrase
for the | |
| getParams | back to summary |
|---|---|
| public HttpParams getParams() Implements org. Doc from org. Deprecated as a consequence of Returns the parameters effective for this message as set by
| |
| getProtocolVersion | back to summary |
|---|---|
| public ProtocolVersion getProtocolVersion() Implements org. Doc from org. Returns the protocol version this message is compatible with.
| |
| getStatusLine | back to summary |
|---|---|
| public StatusLine getStatusLine() Implements org. Doc from org. Obtains the status line of this response.
The status line can be set using one of the
| |
| headerIterator | back to summary |
|---|---|
| public HeaderIterator headerIterator() Implements org. Doc from org. Returns an iterator of all the headers.
| |
| headerIterator | back to summary |
|---|---|
| public HeaderIterator headerIterator(final String name) Implements org. Doc from org. Returns an iterator of the headers with a given name.
| |
| removeHeader | back to summary |
|---|---|
| public void removeHeader(final Header header) Implements org. Doc from org. Removes a header from this message. | |
| removeHeaders | back to summary |
|---|---|
| public void removeHeaders(final String name) Implements org. Doc from org. Removes all headers with a certain name from this message. | |
| setEntity | back to summary |
|---|---|
| public void setEntity(final HttpEntity entity) Implements org. Doc from org. Associates a response entity with this response.
Please note that if an entity has already been set for this response and it depends on
an input stream (
| |
| setHeader | back to summary |
|---|---|
| public void setHeader(final Header header) Implements org. Doc from org. Overwrites the first header with the same name. The new header will be appended to the end of the list, if no header with the given name can be found. | |
| setHeader | back to summary |
|---|---|
| public void setHeader(final String name, final String value) Implements org. Doc from org. Overwrites the first header with the same name. The new header will be appended to the end of the list, if no header with the given name can be found. | |
| setHeaders | back to summary |
|---|---|
| public void setHeaders(final Header[] headers) Implements org. Doc from org. Overwrites all the headers in the message. | |
| setLocale | back to summary |
|---|---|
| public void setLocale(final Locale loc) Implements org. Doc from org. Changes the locale of this response. | |
| setParams | back to summary |
|---|---|
| public void setParams(final HttpParams params) Implements org. Doc from org. Deprecated as a consequence of Provides parameters to be used for the processing of this message.
| |
| setReasonPhrase | back to summary |
|---|---|
| public void setReasonPhrase(final String reason) throws IllegalStateException Implements org. Doc from org. Updates the status line of this response with a new reason phrase.
| |
| setStatusCode | back to summary |
|---|---|
| public void setStatusCode(final int code) throws IllegalStateException Implements org. Doc from org. Updates the status line of this response with a new status code.
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(final StatusLine statusline) Implements org. Doc from org. Sets the status line of this response.
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(final ProtocolVersion ver, final int code) Implements org. Doc from org. Sets the status line of this response.
The reason phrase will be determined based on the current
| |
| setStatusLine | back to summary |
|---|---|
| public void setStatusLine(final ProtocolVersion ver, final int code, final String reason) Implements org. Doc from org. Sets the status line of this response with a reason phrase.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |