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 java.io.InputStreamserve(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> headers)Serve the request file if found, return codenullis file not found.
-
-
-
Method Detail
-
serve
@Nullable java.io.InputStream serve(java.lang.String path, java.util.Map<java.lang.String,java.lang.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.
-
-