The Artima Developer Community
Sponsored Link

Java Buzz Forum
Caveats of HttpURLConnection

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
justin cater

Posts: 19616
Nickname: justin78
Registered: Mar, 2011

Justin Cater is executive editor at Java Code Geeks
Caveats of HttpURLConnection Posted: Sep 9, 2014 1:31 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by justin cater.
Original Post: Caveats of HttpURLConnection
Feed Title: Java Code Geeks
Feed URL: http://feeds.feedburner.com/JavaCodeGeeks
Feed Description: Java 2 Java Developers Resource Center
Latest Java Buzz Posts
Latest Java Buzz Posts by justin cater
Latest Posts From Java Code Geeks

Advertisement

Does this piece of code look ok to you?                     HttpURLConnection connection = null; try { connection = (HttpURLConnection) url.openConnection(); try (InputStream in = url.getInputStream()) { return streamToString(in); } } finally { if (connection != null) connection.disconnect(); } Looks good – it opens a connection, reads […]

Read: Caveats of HttpURLConnection

Topic: Top 10 Java 8 Tutorials - Best of Lot, Must Read Previous Topic   Next Topic Topic: Memory leaks – measuring frequency and severity

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use