title: How to read content of file stored on server using java?
body: <p>How to read file stored on server using java?
  I have .txt file stored on server, how to read contents of it.</p>
  
  <pre><code>String test, newq;
  
  newq = "http://www.example.com/pqr.txt";
  
  test = new String(Files.readAllBytes(Paths.get(newq)));
  
  // variable test should contain pqr.txt content
  </code></pre>
  
  <p>What I am doing wrong?</p>