public class OAuthResourceResponse extends OAuthClientResponse
body, contentType, headers, parameters, responseCode, validator| Constructor and Description |
|---|
OAuthResourceResponse() |
| Modifier and Type | Method and Description |
|---|---|
String |
getBody() |
InputStream |
getBodyAsInputStream() |
String |
getContentType() |
Map<String,List<String>> |
getHeaders() |
int |
getResponseCode() |
protected void |
init(InputStream body,
String contentType,
int responseCode,
Map<String,List<String>> headers)
Default implementation that converts the body InputStream to a String and delegates
to
OAuthClientResponse.init(String, String, int). |
protected void |
setBody(InputStream body)
Allows setting the response body to an InputStream value.
|
protected void |
setBody(String body)
Allows setting the response body to a String value.
|
protected void |
setContentType(String contentType) |
protected void |
setResponseCode(int responseCode) |
getParam, init, init, setHeaders, validatepublic String getBody()
public int getResponseCode()
getResponseCode in class OAuthClientResponsepublic String getContentType()
protected void setBody(InputStream body) throws org.apache.oltu.oauth2.common.exception.OAuthProblemException
OAuthClientResponsesetBody in class OAuthClientResponsebody - An InputStream representing the response body.org.apache.oltu.oauth2.common.exception.OAuthProblemExceptionprotected void setBody(String body) throws org.apache.oltu.oauth2.common.exception.OAuthProblemException
OAuthClientResponsesetBody in class OAuthClientResponsebody - A String representing the response body.org.apache.oltu.oauth2.common.exception.OAuthProblemExceptionpublic InputStream getBodyAsInputStream()
protected void setContentType(String contentType)
setContentType in class OAuthClientResponseprotected void setResponseCode(int responseCode)
setResponseCode in class OAuthClientResponseprotected void init(InputStream body, String contentType, int responseCode, Map<String,List<String>> headers) throws org.apache.oltu.oauth2.common.exception.OAuthProblemException
OAuthClientResponseOAuthClientResponse.init(String, String, int).
init in class OAuthClientResponsebody - an InputStream representing the response bodycontentType - the content type of the response.responseCode - the HTTP response code of the response.headers - The HTTP response headersorg.apache.oltu.oauth2.common.exception.OAuthProblemExceptionCopyright © 2010–2016 The Apache Software Foundation. All rights reserved.