public class HttpContentResponse extends Object implements ContentResponse
Response.AsyncContentListener, Response.BeginListener, Response.CompleteListener, Response.ContentListener, Response.FailureListener, Response.HeaderListener, Response.HeadersListener, Response.Listener, Response.ResponseListener, Response.SuccessListener
Constructor and Description |
---|
HttpContentResponse(Response response,
byte[] content,
String mediaType,
String encoding) |
Modifier and Type | Method and Description |
---|---|
boolean |
abort(Throwable cause)
Attempts to abort the receive of this response.
|
byte[] |
getContent() |
String |
getContentAsString() |
String |
getEncoding() |
HttpFields |
getHeaders() |
<T extends Response.ResponseListener> |
getListeners(Class<T> listenerClass) |
String |
getMediaType() |
String |
getReason() |
Request |
getRequest() |
int |
getStatus() |
HttpVersion |
getVersion() |
String |
toString() |
public Request getRequest()
getRequest
in interface Response
public <T extends Response.ResponseListener> List<T> getListeners(Class<T> listenerClass)
getListeners
in interface Response
Request#send(CompleteListener)
public HttpVersion getVersion()
getVersion
in interface Response
public int getStatus()
public String getReason()
getReason
in interface Response
Response.getStatus()
public HttpFields getHeaders()
getHeaders
in interface Response
public boolean abort(Throwable cause)
Response
public String getMediaType()
getMediaType
in interface ContentResponse
public String getEncoding()
getEncoding
in interface ContentResponse
public byte[] getContent()
getContent
in interface ContentResponse
public String getContentAsString()
getContentAsString
in interface ContentResponse
Content-Type
header, if any, or UTF-8.Copyright © 1995-2015 Webtide. All Rights Reserved.