title: Get FileNotFoundException when initialising FileInputStream with File object
body: <p>I am trying to initialise a FileInputStream object using a File object. I am getting a FileNotFound error on the line </p>
  
  <pre><code>fis = new FileInputStream(file);
  </code></pre>
  
  <p>This is strange since I have opened this file through the same method to do regex many times.</p>
  
  <p>My method is as follows:</p>
  
  <pre><code>private BufferedInputStream fileToBIS(File file){
  
      FileInputStream fis = null;
      BufferedInputStream bis =null; 
      try {
          fis = new FileInputStream(file);
          bis = new BufferedInputStream(fis);
      } catch (FileNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }   
      return bis;
  }
  </code></pre>
  
  <p>java.io.FileNotFoundException: C:\dev\server\tomcat6\webapps\sample-site (Access is denied)
  <br>&nbsp;&nbsp;&nbsp;&nbsp;at java.io.FileInputStream.open(Native Method)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at java.io.FileInputStream.(Unknown Source)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at java.io.FileInputStream.(Unknown Source)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at controller.ScanEditRegions.fileToBIS(ScanEditRegions.java:52)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at controller.ScanEditRegions.tidyHTML(ScanEditRegions.java:38)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at controller.ScanEditRegions.process(ScanEditRegions.java:64)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at controller.ScanEditRegions.visitAllDirsAndFiles(ScanEditRegions.java:148)
      <br>&nbsp;&nbsp;&nbsp;&nbsp;at controller.Manager.main(Manager.java:10)</p>