org.apache.http.HttpMessage
, org.apache.http.HttpResponse
public static class StringHttpMessages.HttpResponse
extends org.apache.http.message.AbstractHttpMessage
implements org.apache.http.HttpResponse
HttpResponse
using strings (based on ByteArrayEntity
).Constructor | Description |
---|---|
HttpResponse(int status,
java.lang.String reason,
byte[] content,
int contentLength,
org.apache.http.entity.ContentType type) |
|
HttpResponse(int status,
java.lang.String reason,
byte[] content,
org.apache.http.entity.ContentType type) |
|
HttpResponse(int status,
java.lang.String reason,
java.lang.String content,
org.apache.http.entity.ContentType type) |
|
HttpResponse(java.lang.String content) |
|
HttpResponse(java.lang.String content,
org.apache.http.entity.ContentType type) |
Modifier and Type | Method | Description |
---|---|---|
org.apache.http.HttpEntity |
getEntity() |
|
java.util.Locale |
getLocale() |
Deprecated.
|
org.apache.http.ProtocolVersion |
getProtocolVersion() |
|
org.apache.http.StatusLine |
getStatusLine() |
|
void |
setEntity(org.apache.http.HttpEntity entity) |
|
void |
setLocale(java.util.Locale loc) |
Deprecated.
|
void |
setReasonPhrase(java.lang.String reason) |
|
void |
setStatusCode(int code) |
|
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code) |
|
void |
setStatusLine(org.apache.http.ProtocolVersion ver,
int code,
java.lang.String reason) |
|
void |
setStatusLine(org.apache.http.StatusLine statusline) |
|
java.lang.String |
toString() |
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
public HttpResponse(int status, java.lang.String reason, byte[] content, int contentLength, org.apache.http.entity.ContentType type)
public HttpResponse(java.lang.String content)
public HttpResponse(java.lang.String content, org.apache.http.entity.ContentType type)
public HttpResponse(int status, java.lang.String reason, java.lang.String content, org.apache.http.entity.ContentType type)
public HttpResponse(int status, java.lang.String reason, byte[] content, org.apache.http.entity.ContentType type)
public org.apache.http.ProtocolVersion getProtocolVersion()
getProtocolVersion
in interface org.apache.http.HttpMessage
public org.apache.http.StatusLine getStatusLine()
getStatusLine
in interface org.apache.http.HttpResponse
public org.apache.http.HttpEntity getEntity()
getEntity
in interface org.apache.http.HttpResponse
public java.lang.String toString()
toString
in class java.lang.Object
public void setStatusLine(org.apache.http.StatusLine statusline)
setStatusLine
in interface org.apache.http.HttpResponse
public void setStatusLine(org.apache.http.ProtocolVersion ver, int code)
setStatusLine
in interface org.apache.http.HttpResponse
public void setStatusLine(org.apache.http.ProtocolVersion ver, int code, java.lang.String reason)
setStatusLine
in interface org.apache.http.HttpResponse
public void setStatusCode(int code) throws java.lang.IllegalStateException
setStatusCode
in interface org.apache.http.HttpResponse
java.lang.IllegalStateException
public void setReasonPhrase(java.lang.String reason) throws java.lang.IllegalStateException
setReasonPhrase
in interface org.apache.http.HttpResponse
java.lang.IllegalStateException
public void setEntity(org.apache.http.HttpEntity entity)
setEntity
in interface org.apache.http.HttpResponse
@Deprecated public java.util.Locale getLocale()
getLocale
in interface org.apache.http.HttpResponse
@Deprecated public void setLocale(java.util.Locale loc)
setLocale
in interface org.apache.http.HttpResponse