public class StaticFileWriter extends Object implements ManagedWriter
| Modifier and Type | Field and Description |
|---|---|
boolean |
done |
static int |
HTTP_CACHE_SECONDS |
static String |
HTTP_DATE_FORMAT |
static String |
HTTP_DATE_GMT_TIMEZONE |
| Constructor and Description |
|---|
StaticFileWriter(io.netty.channel.ChannelHandlerContext ctx,
HttpResponse resIgnored,
ResolvedFile file,
HttpRequest request,
Map<String,String> formats,
FilesConfig conf) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelFuture |
doWrite()
If the file is a directory then the response object Higgs created is sent.
|
ResolvedFile |
getFile() |
boolean |
isDone() |
public static final String HTTP_DATE_FORMAT
public static final String HTTP_DATE_GMT_TIMEZONE
public static final int HTTP_CACHE_SECONDS
public boolean done
public StaticFileWriter(io.netty.channel.ChannelHandlerContext ctx,
HttpResponse resIgnored,
ResolvedFile file,
HttpRequest request,
Map<String,String> formats,
FilesConfig conf)
public io.netty.channel.ChannelFuture doWrite()
HttpResponse extends DefaultFullHttpResponse
This means that once higgsPreparedResponse is written Netty will close the stream.
Because of this, res is an instance of DefaultHttpResponse NOT THE .codec.http.DefaultFullHttpResponse
When res is written, the stream is left open so that the contents of a file can be written afterdoWrite in interface ManagedWriterpublic boolean isDone()
isDone in interface ManagedWriterpublic ResolvedFile getFile()
getFile in interface ManagedWriterCopyright © 2012-2015. All Rights Reserved.