public class PayloadWriter
extends java.lang.Object
Constructor and Description |
---|
PayloadWriter(Env env,
Site site,
Request request,
Response response) |
PayloadWriter(Env env,
Site site,
Request request,
Response response,
java.util.concurrent.ExecutorService executor) |
PayloadWriter(Env env,
Site site,
Request request,
Response response,
int executorThreads) |
Modifier and Type | Method and Description |
---|---|
protected void |
close() |
protected java.lang.String |
etag(byte[] data) |
protected byte[] |
forCompiledPath(CompiledPath compiledPath) |
protected byte[] |
forInputStream(java.io.InputStream stream) |
protected byte[] |
forModelAndView(ModelAndView modelAndView) |
protected byte[] |
forPath(java.nio.file.Path path) |
protected byte[] |
forString(java.lang.String value) |
protected byte[] |
forTemplatePath(java.nio.file.Path path) |
protected java.lang.String |
getContentType(Payload payload,
java.lang.String uri) |
protected byte[] |
getData(Payload payload,
java.lang.String uri) |
protected long |
getLastModified(Payload payload) |
protected boolean |
isStream(Payload payload) |
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 |
writeBytes(java.lang.String uri,
Payload payload) |
public PayloadWriter(Env env, Site site, Request request, Response response, java.util.concurrent.ExecutorService executor)
public void writeAndClose(Payload payload) throws java.io.IOException
java.io.IOException
protected void close()
protected void write(Payload payload) throws java.io.IOException
java.io.IOException
protected void writeBytes(java.lang.String uri, Payload payload) throws java.io.IOException
java.io.IOException
protected void streamPayload(java.lang.String uri, Payload payload) throws java.io.IOException
java.io.IOException
protected void write(byte[] data) throws java.io.IOException
java.io.IOException
protected boolean shouldGzip()
protected boolean shouldIgnoreError(java.io.IOException e)
protected java.lang.String etag(byte[] data)
protected boolean isStream(Payload payload)
protected java.lang.String getContentType(Payload payload, java.lang.String uri)
protected byte[] getData(Payload payload, java.lang.String uri) throws java.io.IOException
java.io.IOException
protected byte[] toJson(java.lang.Object content)
protected long getLastModified(Payload payload) throws java.io.IOException
java.io.IOException
protected byte[] forString(java.lang.String value)
protected byte[] forInputStream(java.io.InputStream stream) throws java.io.IOException
java.io.IOException
protected byte[] forModelAndView(ModelAndView modelAndView)
protected byte[] forPath(java.nio.file.Path path) throws java.io.IOException
java.io.IOException
protected byte[] forCompiledPath(CompiledPath compiledPath) throws java.io.IOException
java.io.IOException
protected byte[] forTemplatePath(java.nio.file.Path path)
Copyright © 2014. All Rights Reserved.