title: Getting contents of webpage in a string in Java (similar to php's file_get_contents())
body: <p>First of i'm a noob when it comes to android/java, i just started looking into it this week.</p>
  
  <p>I have been searching the internet and trying out different things all day to find out how to get the contents of a webpage into a string in java (without webview). everything to be found is either deprecated or it's my lack of understanding that stands in my way, i've been reading documentation and everything but it just gets my head spinning, even though the task seems to be so simple, in php it just requires one function: file_get_contents()</p>
  
  <p>I am able to do this using a invisible WebView, but as far as i know that's not the way to go, plus i also want to be able to post stuff to a webpage (though i might be able to do that by performing some javascript on the webview, but still that doesn't seem to be the way to go).</p>
  
  <p>Can someone please give me a simple example of how to get the contents of a webpage into a string 
  and a simple example to post something to a webpage (and retrieve the response into a string)</p>
  
  <p>If possible with some explanation, but if i get a working example i can figure out why it works.</p>