core/play/src/main/java/play/mvc/RangeResults.java
public static Result ofFile(
      Http.Request request, File file, String fileName, FileMimeTypes fileMimeTypes) {
    return JavaRangeResult.ofFile(
        file, rangeHeader(request), fileName, fileMimeTypes.forFileName(fileName));
  }
public static Result ofFile(
      Http.Request request, File file, String fileName, FileMimeTypes fileMimeTypes) {
    return JavaRangeResult.ofFile(
        file, rangeHeader(request), fileName, fileMimeTypes.forFileName(fileName));
  }
public static Result ofFile ( Http . Request request , File file , String fileName , FileMimeTypes fileMimeTypes ) { return JavaRangeResult . ofFile ( file , rangeHeader ( request ) , fileName , fileMimeTypes . forFileName ( fileName ) ) ; }
Returns the file 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 file the content file
@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
Returns the file 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 .