title: Read file from remote machine using java io
body: <pre><code>public static void main(String[] args) throws IOException, URISyntaxException {
  
      String ipaddress = "10.20.220.187";
      String folderpath = "C:\\Users\\Administrator\\Desktop\\KS_testData\\";
      String fileName = "test.txt";
  
      String inputFileName = "file:\\\\"+ipaddress+"\\"+folderpath+fileName;
  
      System.out.println(" inputFileName "+inputFileName);
  
      File file = new File(inputFileName);
      FileReader inputFileReader = new FileReader(file);
      BufferedReader inputStream = new BufferedReader(inputFileReader);
  
      String inLine = null;
      while ((inLine = inputStream.readLine()) != null) {
          System.out.println(inLine);
      }
  }
  </code></pre>
  
  <p>Here Im trying to connect to provided ipaddress and read file on it,
  The specified folder name is a Shared Folder and Im getting FileNotFoundException. 
  Can anyone suggest what Im doing wrong.</p>
  
  <p>Output received is :</p>
  
  <pre><code>    inputFileName file:\\10.20.220.187\C:\Users\Administrator\Desktop\KS_testData\test.txt
  Exception in thread "main" java.io.FileNotFoundException: file:\10.20.220.187\C:\Users\Administrator\Desktop\KS_testData\test.txt (The filename, directory name, or volume label syntax is incorrect)
      at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(FileInputStream.java:195)
      at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138)
      at java.io.FileReader.&lt;init&gt;(FileReader.java:72)
      at com.sv.ppsdemos.remote.RemoteReadAndWrite.main(RemoteReadAndWrite.java:22)
  </code></pre>