Package ej.hoka.http.requesthandler
Interface StaticFilesHandler
-
- All Known Implementing Classes:
ClasspathFilesHandler
public interface StaticFilesHandlerRequest handler to serve static files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InputStreamserve(String path, Map<String,String> headers)Serve the request file if found, return codenullis file not found.
-
-
-
Method Detail
-
serve
@Nullable InputStream serve(String path, Map<String,String> headers)
Serve the request file if found, return codenullis file not found.- Parameters:
path- path of the reuqested file.headers- list of headers to append to the Http response.- Returns:
- the file input stream or code
nullif the file is not found.
-
-