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.| 构造器和说明 |
|---|
FileContextHandler(File dir) |
protected final File base
public FileContextHandler(File dir) throws IOException
IOExceptionpublic int serve(HTTPServer.Request req, HTTPServer.Response resp) throws IOException
HTTPServer.ContextHandlerserve 在接口中 HTTPServer.ContextHandlerreq - the request to be servedresp - the response to be filledIOException - if an IO error occursCopyright © 2022. All rights reserved.