public class PayloadWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CompilerFacade |
compilers |
protected Env |
env |
protected Request |
request |
protected Resources |
resources |
protected Response |
response |
protected Site |
site |
| Constructor and Description |
|---|
PayloadWriter(Request request,
Response response,
Env env,
Site site,
Resources resources,
CompilerFacade compilers) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close() |
protected String |
etag(byte[] data) |
protected byte[] |
forModelAndView(ModelAndView modelAndView) |
protected byte[] |
forPath(java.nio.file.Path path) |
protected byte[] |
forSourceFile(SourceFile sourceFile) |
protected byte[] |
forString(String value) |
protected byte[] |
forTemplatePath(java.nio.file.Path path) |
protected byte[] |
forURL(URL url) |
protected String |
getContentType(Object content,
String uri) |
protected byte[] |
getData(Object content,
String uri) |
protected long |
getLastModified(Payload payload) |
protected boolean |
isStream(Object content) |
protected boolean |
shouldGzip() |
protected boolean |
shouldIgnoreError(IOException e) |
protected void |
streamPayload(String uri,
Payload payload) |
protected byte[] |
toJson(Object content) |
protected void |
write(byte[] data) |
protected void |
write(Payload payload) |
void |
writeAndClose(Payload payload) |
protected void |
writeBufferedReader(Payload payload) |
protected void |
writeBytes(String uri,
Payload payload) |
protected void |
writeEventStream(Payload payload) |
protected void |
writeInputStream(Payload payload) |
protected void |
writeStreamingHeaders() |
protected final Request request
protected final Response response
protected final Env env
protected final Site site
protected final Resources resources
protected final CompilerFacade compilers
public void writeAndClose(Payload payload) throws IOException
IOExceptionprotected void close()
protected void write(Payload payload) throws IOException
IOExceptionprotected void writeBytes(String uri, Payload payload) throws IOException
IOExceptionprotected void writeStreamingHeaders()
throws IOException
IOExceptionprotected void streamPayload(String uri, Payload payload) throws IOException
IOExceptionprotected void writeEventStream(Payload payload) throws IOException
IOExceptionprotected void writeBufferedReader(Payload payload) throws IOException
IOExceptionprotected void writeInputStream(Payload payload) throws IOException
IOExceptionprotected void write(byte[] data)
throws IOException
IOExceptionprotected boolean shouldGzip()
protected boolean shouldIgnoreError(IOException e)
protected String etag(byte[] data)
protected boolean isStream(Object content)
protected byte[] getData(Object content, String uri) throws IOException
IOExceptionprotected byte[] toJson(Object content)
protected long getLastModified(Payload payload) throws IOException
IOExceptionprotected byte[] forString(String value)
protected byte[] forModelAndView(ModelAndView modelAndView)
protected byte[] forURL(URL url) throws IOException
IOExceptionprotected byte[] forPath(java.nio.file.Path path) throws IOException
IOExceptionprotected byte[] forSourceFile(SourceFile sourceFile) throws IOException
IOExceptionprotected byte[] forTemplatePath(java.nio.file.Path path)
Copyright © 2015. All Rights Reserved.