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
IOException
protected void close()
protected void write(Payload payload) throws IOException
IOException
protected void writeBytes(String uri, Payload payload) throws IOException
IOException
protected void writeStreamingHeaders() throws IOException
IOException
protected void streamPayload(String uri, Payload payload) throws IOException
IOException
protected void writeEventStream(Payload payload) throws IOException
IOException
protected void writeBufferedReader(Payload payload) throws IOException
IOException
protected void writeInputStream(Payload payload) throws IOException
IOException
protected void write(byte[] data) throws IOException
IOException
protected 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
IOException
protected byte[] toJson(Object content)
protected long getLastModified(Payload payload) throws IOException
IOException
protected byte[] forString(String value)
protected byte[] forModelAndView(ModelAndView modelAndView)
protected byte[] forURL(URL url) throws IOException
IOException
protected byte[] forPath(java.nio.file.Path path) throws IOException
IOException
protected byte[] forSourceFile(SourceFile sourceFile) throws IOException
IOException
protected byte[] forTemplatePath(java.nio.file.Path path)
Copyright © 2015. All Rights Reserved.