Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

close HttpURLConnection if stream has not finished reading  RSS feed

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i am reading content from a website using HttpURLConnection ..

i figured i will be faster if a set a stopmark if i only need lets say one third of the page's source code

so what im doing looks pretty much like this




does the inputstream.close() and connection.disconnect() methods go thru normally if the stream has not finished reading or am i in trouble here ??

thank you for help
 
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!