Interface StaticFilesHandler

  • All Known Implementing Classes:
    ClasspathFilesHandler

    public interface StaticFilesHandler
    Request handler to serve static files.
    • Method Detail

      • serve

        @Nullable
        InputStream serve​(String path,
                          Map<String,​String> headers)
        Serve the request file if found, return code null is 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 null if the file is not found.