public class StaticFileHandler extends RouteHandler
| Modifier and Type | Field and Description |
|---|---|
static int |
HTTP_CACHE_SECONDS |
HTTP_DATE_FORMAT, HTTP_DATE_GMT_TIMEZONE| Constructor and Description |
|---|
StaticFileHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleStaticFileRequest(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
String rawPath) |
static void |
init() |
protected File |
locateFile(String path) |
protected void |
setContentTypeHeader(io.netty.handler.codec.http.HttpResponse response,
File file)
Sets the content type header for the HTTP Response
|
setDateAndCacheHeaders, setDateHeaderpublic static final int HTTP_CACHE_SECONDS
public static void init()
throws ConfigurationException
ConfigurationExceptionpublic void handleStaticFileRequest(io.netty.channel.ChannelHandlerContext ctx,
io.netty.handler.codec.http.HttpRequest req,
String rawPath)
throws IOException
IOExceptionprotected void setContentTypeHeader(io.netty.handler.codec.http.HttpResponse response,
File file)
file - file to extract content typeCopyright © 2018 Space Applications Services. All rights reserved.