public class PayloadWriter
extends java.lang.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 java.lang.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(java.lang.String value) |
protected byte[] |
forTemplatePath(java.nio.file.Path path) |
protected byte[] |
forURL(java.net.URL url) |
protected java.lang.String |
getContentType(java.lang.Object content,
java.lang.String uri) |
protected byte[] |
getData(java.lang.Object content,
java.lang.String uri) |
protected long |
getLastModified(Payload payload) |
protected boolean |
isStream(java.lang.Object content) |
protected boolean |
shouldGzip() |
protected boolean |
shouldIgnoreError(java.io.IOException e) |
protected void |
streamPayload(java.lang.String uri,
Payload payload) |
protected byte[] |
toJson(java.lang.Object content) |
protected void |
write(byte[] data) |
protected void |
write(Payload payload) |
void |
writeAndClose(Payload payload) |
protected void |
writeBufferedReader(Payload payload) |
protected void |
writeBytes(java.lang.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 java.io.IOException
java.io.IOExceptionprotected void close()
protected void write(Payload payload) throws java.io.IOException
java.io.IOExceptionprotected void writeBytes(java.lang.String uri,
Payload payload)
throws java.io.IOException
java.io.IOExceptionprotected void writeStreamingHeaders()
throws java.io.IOException
java.io.IOExceptionprotected void streamPayload(java.lang.String uri,
Payload payload)
throws java.io.IOException
java.io.IOExceptionprotected void writeEventStream(Payload payload) throws java.io.IOException
java.io.IOExceptionprotected void writeBufferedReader(Payload payload) throws java.io.IOException
java.io.IOExceptionprotected void writeInputStream(Payload payload) throws java.io.IOException
java.io.IOExceptionprotected void write(byte[] data)
throws java.io.IOException
java.io.IOExceptionprotected boolean shouldGzip()
protected boolean shouldIgnoreError(java.io.IOException e)
protected java.lang.String etag(byte[] data)
protected boolean isStream(java.lang.Object content)
protected java.lang.String getContentType(java.lang.Object content,
java.lang.String uri)
protected byte[] getData(java.lang.Object content,
java.lang.String uri)
throws java.io.IOException
java.io.IOExceptionprotected byte[] toJson(java.lang.Object content)
protected long getLastModified(Payload payload) throws java.io.IOException
java.io.IOExceptionprotected byte[] forString(java.lang.String value)
protected byte[] forModelAndView(ModelAndView modelAndView)
protected byte[] forURL(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionprotected byte[] forPath(java.nio.file.Path path)
throws java.io.IOException
java.io.IOExceptionprotected byte[] forSourceFile(SourceFile sourceFile) throws java.io.IOException
java.io.IOExceptionprotected byte[] forTemplatePath(java.nio.file.Path path)
Copyright © 2015. All Rights Reserved.