code: protected HttpBuilder sendFile(File file, boolean delete) throws FileNotFoundException {
          try{
              FileResponse resp = new FileResponse(file, delete);
              RequestContext.setControllerResponse(resp);
              HttpBuilder builder = new HttpBuilder(resp);
              builder.header("Content-Disposition", "attachment; filename=" + file.getName());
              return builder;
          }catch(Exception e){
              throw new ControllerException(e);
          }
      }
docs: Convenience method for downloading files. This method will force the browser to find a handler(external program)
  for  this file (content type) and will provide a name of file to the browser. This method sets an HTTP header
  "Content-Disposition" based on a file name.
  
  @param file file to download.
  @param delete true to delete the file after processing
  @return builder instance.
  @throws FileNotFoundException thrown if file not found.