public static class Response.Content<S extends Stream> extends Response
Response.Content<S extends Stream>, Response.Error, Response.Redirect, Response.Render, Response.View| Modifier and Type | Method and Description |
|---|---|
Class<S> |
getKind() |
String |
getMimeType() |
Integer |
getStatus() |
Streamable<S> |
getStreamable() |
void |
send(S stream)
Send the response on the stream argument, Juzu invokes it when it needs to render the content object.
|
Response.Content<S> |
with(PropertyType<Boolean> propertyType)
Set a boolean property to true.
|
<T> Response.Content<S> |
with(PropertyType<T> propertyType,
T propertyValue)
Set a property, if the value is null, the property is removed.
|
Response.Content<S> |
withHeader(String name,
String... value) |
Response.Content<S> |
withMimeType(String mimeType) |
Response.Content<S> |
withNo(PropertyType<Boolean> propertyType)
Set a boolean property to false.
|
<T> Response.Content<S> |
without(PropertyType<T> propertyType)
Removes a property.
|
public Streamable<S> getStreamable()
public String getMimeType()
public Response.Content<S> withMimeType(String mimeType)
public Response.Content<S> withHeader(String name, String... value)
withHeader in class Responsepublic <T> Response.Content<S> with(PropertyType<T> propertyType, T propertyValue) throws NullPointerException
Responsewith in class ResponsepropertyType - the property typepropertyValue - the property valueNullPointerException - if the property type is nullpublic <T> Response.Content<S> without(PropertyType<T> propertyType) throws NullPointerException
Responsewithout in class ResponsepropertyType - the property typeNullPointerException - if the property type is nullpublic Response.Content<S> with(PropertyType<Boolean> propertyType) throws NullPointerException
Responsewith in class ResponsepropertyType - the property typeNullPointerException - if the property type is nullpublic Response.Content<S> withNo(PropertyType<Boolean> propertyType) throws NullPointerException
ResponsewithNo in class ResponsepropertyType - the property typeNullPointerException - if the property type is nullpublic Integer getStatus()
public void send(S stream) throws IOException
stream - the stream for sending the responseIOException - any io exceptionCopyright © 2013 eXo Platform SAS. All Rights Reserved.