Interface StaticFilesHandler

  • All Known Implementing Classes:
    ClasspathFilesHandler

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 code null is 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 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.