private boolean consumeWithFileResourceHandlers(HttpServletRequest httpRequest,
                                                    HttpServletResponse httpResponse) throws IOException {
        if (staticResourceHandlers != null) {

            for (AbstractResourceHandler staticResourceHandler : staticResourceHandlers) {

                AbstractFileResolvingResource resource = staticResourceHandler.getResource(httpRequest);

                if (resource != null && resource.isReadable()) {

                    if (MimeType.shouldGuess()) {
                        httpResponse.setHeader(MimeType.CONTENT_TYPE, MimeType.fromResource(resource));
                    }
                    customHeaders.forEach(httpResponse::setHeader); //add all user-defined headers to response

                    try (InputStream inputStream = resource.getInputStream();
                         OutputStream wrappedOutputStream = GzipUtils.checkAndWrap(httpRequest, httpResponse, false)) {
                        IOUtils.copy(inputStream, wrappedOutputStream);
                    }

                    return true;
                }
            }

        }
        return false;
    }
Attempt consuming using either static resource handlers or jar resource handlers

@param httpRequest  The HTTP servlet request.
@param httpResponse The HTTP servlet response.
@return true if consumed, false otherwise.
@throws IOException in case of IO error.
src/main/java/spark/staticfiles/StaticFilesConfiguration.java