public class ODataResponse extends Object
Constructor and Description |
---|
ODataResponse() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
List<String> values)
Adds a header to the response.
|
void |
addHeader(String name,
String value)
Adds a header to the response.
|
Map<String,List<String>> |
getAllHeaders()
Get all headers with the according values.
|
InputStream |
getContent()
Gets the content (body).
|
String |
getHeader(String name)
Gets first header value for a given name.
|
List<String> |
getHeaders(String name)
Gets header value for a given name.
|
ODataContent |
getODataContent() |
int |
getStatusCode()
Gets the status code.
|
void |
setContent(InputStream content)
Sets the content (body).
|
void |
setHeader(String name,
String value)
Set a header to the response.
|
void |
setODataContent(ODataContent result) |
void |
setStatusCode(int statusCode)
Sets the status code.
|
public void setStatusCode(int statusCode)
HttpStatusCode
public int getStatusCode()
HttpStatusCode
public void setHeader(String name, String value)
Set a header to the response.
The header name will be handled as case-insensitive key.
If a header already exists then the header will be replaced by this new value.
name
- case-insensitive header namevalue
- value for the given header namepublic void addHeader(String name, String value)
Adds a header to the response.
The header name will be handled as case-insensitive key.
If a header already exists then the list of values will just be extended.
name
- case-insensitive header namevalue
- value for the given header namepublic void addHeader(String name, List<String> values)
Adds a header to the response.
The header name will be handled as case-insensitive key.
If a header already exists then the list of values will just be extended.
name
- case-insensitive header namevalues
- list of values for the given header namepublic Map<String,List<String>> getAllHeaders()
public List<String> getHeaders(String name)
name
- the header name as a case-insensitive keypublic String getHeader(String name)
null
is returned.name
- the header name as a case-insensitive keypublic void setContent(InputStream content)
content
- the content as InputStream
public InputStream getContent()
InputStream
public void setODataContent(ODataContent result)
public ODataContent getODataContent()
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.