public static class Response.Body extends Response.Status
Response.Body, Response.Content, Response.Error, Response.Redirect, Response.Status, Response.View
Modifier and Type | Method and Description |
---|---|
Charset |
getCharset() |
Streamable |
getData() |
String |
getMimeType() |
Response.Body |
with(PropertyType<Boolean> propertyType)
Set a boolean property to true.
|
<T> Response.Body |
with(PropertyType<T> propertyType,
T propertyValue)
Set a property, if the value is null, the property is removed.
|
Response.Body |
withCharset(Charset charset) |
Response.Body |
withHeader(String name,
String... value) |
Response.Body |
withMimeType(String mimeType) |
Response.Body |
withNo(PropertyType<Boolean> propertyType)
Set a boolean property to false.
|
<T> Response.Body |
without(PropertyType<T> propertyType)
Removes a property.
|
body, body, body, body, body, content, content, content, content, getCode, streamable
public Streamable getData()
public String getMimeType()
public Charset getCharset()
public Response.Body withCharset(Charset charset)
public Response.Body withMimeType(String mimeType)
public Response.Body withHeader(String name, String... value)
withHeader
in class Response.Status
public <T> Response.Body with(PropertyType<T> propertyType, T propertyValue) throws NullPointerException
Response
with
in class Response.Status
propertyType
- the property typepropertyValue
- the property valueNullPointerException
- if the property type is nullpublic <T> Response.Body without(PropertyType<T> propertyType) throws NullPointerException
Response
without
in class Response.Status
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Body with(PropertyType<Boolean> propertyType) throws NullPointerException
Response
with
in class Response.Status
propertyType
- the property typeNullPointerException
- if the property type is nullpublic Response.Body withNo(PropertyType<Boolean> propertyType) throws NullPointerException
Response
withNo
in class Response.Status
propertyType
- the property typeNullPointerException
- if the property type is nullCopyright © 2015 eXo Platform SAS. All rights reserved.