|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.http.message.AbstractHttpMessage
public abstract class AbstractHttpMessage
Basic implementation of HttpMessage
.
Field Summary | |
---|---|
protected HeaderGroup |
headergroup
|
protected HttpParams |
params
Deprecated. Do not use. |
Constructor Summary | |
---|---|
protected |
AbstractHttpMessage()
|
protected |
AbstractHttpMessage(HttpParams params)
Deprecated. (4.3) use AbstractHttpMessage() |
Method Summary | |
---|---|
void |
addHeader(Header header)
Adds a header to this message. |
void |
addHeader(String name,
String value)
Adds a header to this message. |
boolean |
containsHeader(String name)
Checks if a certain header is present in this message. |
Header[] |
getAllHeaders()
Returns all the headers of this message. |
Header |
getFirstHeader(String name)
Returns the first header with a specified name of this message. |
Header[] |
getHeaders(String name)
Returns all the headers with a specified name of this message. |
Header |
getLastHeader(String name)
Returns the last header with a specified name of this message. |
HttpParams |
getParams()
Deprecated. (4.3) use constructor parameters of configuration API provided by HttpClient |
HeaderIterator |
headerIterator()
Returns an iterator of all the headers. |
HeaderIterator |
headerIterator(String name)
Returns an iterator of the headers with a given name. |
void |
removeHeader(Header header)
Removes a header from this message. |
void |
removeHeaders(String name)
Removes all headers with a certain name from this message. |
void |
setHeader(Header header)
Overwrites the first header with the same name. |
void |
setHeader(String name,
String value)
Overwrites the first header with the same name. |
void |
setHeaders(Header[] headers)
Overwrites all the headers in the message. |
void |
setParams(HttpParams params)
Deprecated. (4.3) use constructor parameters of configuration API provided by HttpClient |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.http.HttpMessage |
---|
getProtocolVersion |
Field Detail |
---|
protected HeaderGroup headergroup
@Deprecated protected HttpParams params
Constructor Detail |
---|
@Deprecated protected AbstractHttpMessage(HttpParams params)
AbstractHttpMessage()
protected AbstractHttpMessage()
Method Detail |
---|
public boolean containsHeader(String name)
HttpMessage
containsHeader
in interface HttpMessage
name
- the header name to check for.
public Header[] getHeaders(String name)
HttpMessage
getHeaders
in interface HttpMessage
name
- the name of the headers to return.
name
.public Header getFirstHeader(String name)
HttpMessage
HttpMessage.getHeaders(String)
is returned.
If there is no matching header in the message null
is
returned.
getFirstHeader
in interface HttpMessage
name
- the name of the header to return.
name
or null
if no such header could be found.public Header getLastHeader(String name)
HttpMessage
HttpMessage.getHeaders(String)
is returned. If there is no
matching header in the message null
is returned.
getLastHeader
in interface HttpMessage
name
- the name of the header to return.
name
.
or null
if no such header could be found.public Header[] getAllHeaders()
HttpMessage
getAllHeaders
in interface HttpMessage
public void addHeader(Header header)
HttpMessage
addHeader
in interface HttpMessage
header
- the header to append.public void addHeader(String name, String value)
HttpMessage
addHeader
in interface HttpMessage
name
- the name of the header.value
- the value of the header.public void setHeader(Header header)
HttpMessage
setHeader
in interface HttpMessage
header
- the header to set.public void setHeader(String name, String value)
HttpMessage
setHeader
in interface HttpMessage
name
- the name of the header.value
- the value of the header.public void setHeaders(Header[] headers)
HttpMessage
setHeaders
in interface HttpMessage
headers
- the array of headers to set.public void removeHeader(Header header)
HttpMessage
removeHeader
in interface HttpMessage
header
- the header to remove.public void removeHeaders(String name)
HttpMessage
removeHeaders
in interface HttpMessage
name
- The name of the headers to remove.public HeaderIterator headerIterator()
HttpMessage
headerIterator
in interface HttpMessage
public HeaderIterator headerIterator(String name)
HttpMessage
headerIterator
in interface HttpMessage
name
- the name of the headers over which to iterate, or
null
for all headers
@Deprecated public HttpParams getParams()
HttpMessage
HttpMessage.setParams(HttpParams)
.
getParams
in interface HttpMessage
@Deprecated public void setParams(HttpParams params)
HttpMessage
setParams
in interface HttpMessage
params
- the parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |