• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get a String from an InputStream  RSS feed

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting an InputStream from an HttpURLConnection as follows"


URL url = new URL("http://www.amazon.com");
HttpURLConnection connection = new HttpURLConnection(url);
InputStream inputStream = connection.getInputStream();


I want to extract a String of the HTML from this connection. How do I get it from the InputStream?
 
Bartender
Posts: 9449
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't crosspost.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!