public static class HTTPServer.FileContextHandler extends Object implements HTTPServer.ContextHandler
FileContextHandler services a context by mapping it
to a file or folder (recursively) on disk.| Constructor and Description |
|---|
FileContextHandler(File dir) |
| Modifier and Type | Method and Description |
|---|---|
int |
serve(HTTPServer.Request req,
HTTPServer.Response resp)
Serves the given request using the given response.
|
protected final File base
public FileContextHandler(File dir) throws IOException
IOExceptionpublic int serve(HTTPServer.Request req, HTTPServer.Response resp) throws IOException
HTTPServer.ContextHandlerserve in interface HTTPServer.ContextHandlerreq - the request to be servedresp - the response to be filledIOException - if an IO error occursCopyright © 2021 freeutils.net. All rights reserved.