title: How to read bin file located in java project's folder in eclipse
body: <p>I want to read bin file in java. I create folder that's name is doc in project's folder and I added bin files in doc folder. I want to read with this code;</p>
  
  <pre><code>String fileName = "10.bin";
  byte[] data = new byte[1024];
  int readBytes;
  
  try {
      FileInputStream in = new FileInputStream(fileName);
      while((readBytes = in.read(data)) != -1){
  
      System.out.println("read " + readBytes + "bytes, and placed them into temp array named data");
      }
      in.close();
  
  } catch (FileNotFoundException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  </code></pre>
  
  <p>This bin file named as 10.bin is in doc folder as you can see in picture</p>
  
  <p><img src="https://i.stack.imgur.com/GWJgA.png" alt="enter image description here"></p>
  
  <p>I can not access file with this code. Help me please.</p>