/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileMimeTypes.forFileName(path.toFile().getName())); }
/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileMimeTypes.forFileName(path.toFile().getName())); }
/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileMimeTypes.forFileName(path.toFile().getName())); }
/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileName filename used at the Content-Disposition header. * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, String fileName, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileName, fileMimeTypes.forFileName(fileName)); }
/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileName filename used at the Content-Disposition header. * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, String fileName, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileName, fileMimeTypes.forFileName(fileName)); }
/** * Returns the path as a result considering "Range" header. If the header is present and * it is satisfiable, then a Result containing just the requested part will be returned. * If the header is not present or is unsatisfiable, then a regular Result will be returned. * * @param request the request from which to retrieve the range header. * @param path the content path * @param fileName filename used at the Content-Disposition header. * @param fileMimeTypes Used for file type mapping. * @return range result if "Range" header is present and regular result if not */ public static Result ofPath(Http.Request request, Path path, String fileName, FileMimeTypes fileMimeTypes) { return JavaRangeResult.ofPath(path, rangeHeader(request), fileName, fileMimeTypes.forFileName(fileName)); }