title: java.nio.file.Files alternative for jdk 1.6 or less
body: <p>I am trying to use java.nio.file.Files functionality for the following code</p>
  
  <pre><code>@RequestMapping(value = "/view", method = RequestMethod.GET)
  public HttpServletResponse viewReport(Map model, HttpServletRequest req,HttpServletResponse rep){
  
       try {
  
           ReportGenerationService reportGenerationService = new ReportGenerationService();
           ViewReportParameters viewReportParameters = reportGenerationService.getReportViewParameters();
  
  
           String quote="\"";
           String inlineFileName = "inline; fileName="+quote+viewReportParameters.getFileName()+".pdf"+quote;
  
           File file = new File(filePath);
  
           rep.setHeader("Content-Type", "application/pdf");
           rep.setHeader("Content-Length", String.valueOf(file.length()));
           rep.setHeader("Content-Disposition", inlineFileName);
  
  
              Files.copy(file.toPath(), rep.getOutputStream());
          } catch (IOException e) {
              e.printStackTrace();
          }
  
      return rep;
  }
  </code></pre>
  
  <p>But since the linux box jdk version is older(Java 6) , I cannot be using this. Is there any alternative to do similar operation in Java 6? Thanks in advance</p>