public final class BasicCloseableHttpResponse extends Object implements org.apache.http.client.methods.CloseableHttpResponse
Modifier and Type | Method and Description |
---|---|
static org.apache.http.client.methods.CloseableHttpResponse |
adapt(org.apache.http.HttpResponse response) |
void |
addHeader(org.apache.http.Header header) |
void |
addHeader(String name,
String value) |
void |
close() |
boolean |
containsHeader(String name) |
org.apache.http.Header[] |
getAllHeaders() |
org.apache.http.HttpEntity |
getEntity() |
org.apache.http.Header |
getFirstHeader(String name) |
org.apache.http.Header[] |
getHeaders(String name) |
org.apache.http.Header |
getLastHeader(String name) |
Locale |
getLocale() |
org.apache.http.params.HttpParams |
getParams() |
org.apache.http.ProtocolVersion |
getProtocolVersion() |
org.apache.http.StatusLine |
getStatusLine() |
org.apache.http.HeaderIterator |
headerIterator() |
org.apache.http.HeaderIterator |
headerIterator(String name) |
void |
removeHeader(org.apache.http.Header header) |
void |
removeHeaders(String name) |
void |
setEntity(org.apache.http.HttpEntity entity) |
void |
setHeader(org.apache.http.Header header) |
void |
setHeader(String name,
String value) |
void |
setHeaders(org.apache.http.Header[] headers) |
void |
setLocale(Locale loc) |
void |
setParams(org.apache.http.params.HttpParams params) |
void |
setReasonPhrase(String reason) |
void |
setStatusCode(int code) |
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code) |
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code,
String reason) |
void |
setStatusLine(org.apache.http.StatusLine statusline) |
String |
toString() |
public static org.apache.http.client.methods.CloseableHttpResponse adapt(org.apache.http.HttpResponse response)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public org.apache.http.StatusLine getStatusLine()
getStatusLine
in interface org.apache.http.HttpResponse
public void setStatusLine(org.apache.http.StatusLine statusline)
setStatusLine
in interface org.apache.http.HttpResponse
public org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion
in interface org.apache.http.HttpMessage
public void setStatusLine(org.apache.http.ProtocolVersion ver, int code)
setStatusLine
in interface org.apache.http.HttpResponse
public boolean containsHeader(String name)
containsHeader
in interface org.apache.http.HttpMessage
public void setStatusLine(org.apache.http.ProtocolVersion ver, int code, String reason)
setStatusLine
in interface org.apache.http.HttpResponse
public org.apache.http.Header[] getHeaders(String name)
getHeaders
in interface org.apache.http.HttpMessage
public void setStatusCode(int code)
setStatusCode
in interface org.apache.http.HttpResponse
public org.apache.http.Header getFirstHeader(String name)
getFirstHeader
in interface org.apache.http.HttpMessage
public org.apache.http.Header getLastHeader(String name)
getLastHeader
in interface org.apache.http.HttpMessage
public void setReasonPhrase(String reason)
setReasonPhrase
in interface org.apache.http.HttpResponse
public org.apache.http.Header[] getAllHeaders()
getAllHeaders
in interface org.apache.http.HttpMessage
public org.apache.http.HttpEntity getEntity()
getEntity
in interface org.apache.http.HttpResponse
public void addHeader(org.apache.http.Header header)
addHeader
in interface org.apache.http.HttpMessage
public void addHeader(String name, String value)
addHeader
in interface org.apache.http.HttpMessage
public void setEntity(org.apache.http.HttpEntity entity)
setEntity
in interface org.apache.http.HttpResponse
public void setHeader(org.apache.http.Header header)
setHeader
in interface org.apache.http.HttpMessage
public void setHeader(String name, String value)
setHeader
in interface org.apache.http.HttpMessage
public Locale getLocale()
getLocale
in interface org.apache.http.HttpResponse
public void setHeaders(org.apache.http.Header[] headers)
setHeaders
in interface org.apache.http.HttpMessage
public void removeHeader(org.apache.http.Header header)
removeHeader
in interface org.apache.http.HttpMessage
public void setLocale(Locale loc)
setLocale
in interface org.apache.http.HttpResponse
public void removeHeaders(String name)
removeHeaders
in interface org.apache.http.HttpMessage
public org.apache.http.HeaderIterator headerIterator()
headerIterator
in interface org.apache.http.HttpMessage
public org.apache.http.HeaderIterator headerIterator(String name)
headerIterator
in interface org.apache.http.HttpMessage
public org.apache.http.params.HttpParams getParams()
getParams
in interface org.apache.http.HttpMessage
public void setParams(org.apache.http.params.HttpParams params)
setParams
in interface org.apache.http.HttpMessage
Copyright © 2008–2018. All rights reserved.