title: Java reading file txt from URL
body: <p>I would read txt content from web, I know how to read a local file but I want to put my txt file in a website and read it in my application. I used this code : </p>
  
  <pre><code>    BufferedReader reader = new BufferedReader(new InputStreamReader((new URL("MY TXT    URL")).openStream()));
  
      String line = reader.readLine();
  
      int k =0;
  
      String[] SaveLine = new String[20];
  
      for( k = 0; line!=null; k++)
      {
          System.out.println(reader.readLine());
  
          line=reader.readLine();
  
      }
  </code></pre>
  
  <p>There is a problem, with this code I read the entire webpage, so the HTML is included. How can I just read the file content ? There is a specified website where I could put my txt files for read them?
  Thanks in advance!</p>