title: How to use a url as the InputSource for StringReader
body: <p>I apologize for the stupid question, but I am trying to use a xml file that is online in the following code.</p>
  
  <pre><code>String uri =
   "http://www.myserver.com/xml?month=Jan";
  
          URL url = new URL(uri);
          HttpURLConnection connection =
              (HttpURLConnection) url.openConnection();
          connection.setRequestMethod("GET");
          connection.setRequestProperty("Accept", "application/xml");
  
          InputStream xml1 = connection.getInputStream();
  
  InputSource xml = new InputSource(new StringReader(xml1));
  </code></pre>
  
  <p>I have tried researching the answer before having to ask, but however I try to get this to work I get the error that "The constructor StringReader(InputStream) is undefined"</p>
  
  <p>Thank you for any help you may provide.</p>