Results 1 to 2 of 2
- 05-20-2007, 11:54 AM #1
Member
- Join Date
- May 2007
- Posts
- 3
- Rep Power
- 0
- 05-20-2007, 11:58 AM #2levent Guest
You can use URLConnection class.
Here is a sample code:
If you have more advanced requirements, i recommend you to use Apache HTTPClient library.Java Code:try { URL google = new URL("http://www.google.com/"); URLConnection googleConnection = google.openConnection(); DataInputStream dis = new DataInputStream(googleConnection.getInputStream()); String inputLine; while ((inputLine = dis.readLine()) != null) { System.out.println(inputLine); } dis.close(); } catch (MalformedURLException me) { System.out.println("MalformedURLException: " + me); } catch (IOException ioe) { System.out.println("IOException: " + ioe); }
Similar Threads
-
Kode Java Website
By wsaryada in forum Reviews / AdvertisingReplies: 4Last Post: 01-18-2008, 09:16 PM -
website java button layout
By abcdefg in forum AWT / SwingReplies: 0Last Post: 12-25-2007, 04:44 PM -
Getting content type from a website
By Java Tip in forum Java TipReplies: 0Last Post: 11-26-2007, 01:06 PM -
Getting character set from a website
By Java Tip in forum Java TipReplies: 0Last Post: 11-26-2007, 12:53 PM -
How do i read from a website with a certificate??
By karl in forum Advanced JavaReplies: 0Last Post: 07-12-2007, 04:25 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks