A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Sockets and Internet Protocols
still confused why UnknowHost is NOT fired
Joined: Sep 17, 2006
Oct 27, 2008 02:14:00
I am still confused about how java.net works
String httpRequest = "http://www.yakhoo.com/"; URL url = new URL(httpRequest); URLConnection conn = url.openConnection(); conn.setConnectTimeout(10000); conn.setReadTimeout(30000); //sun.net.www.protocol.http.HttpURLConnection$HttpInputStream InputStream stream = conn.getInputStream(); //System.out.println(stream.getClass().getSuperclass().getName()); stream = new BufferedInputStream(stream); BufferedInputStream buffereds = (BufferedInputStream)stream;
the strange thing is that although there is nothing called yakhoo.com
sometimes an input stream returned, but also sometimes it fires
when you try to get the stream,
so what is happening??
author and iconoclast
Joined: Jul 08, 2003
Oct 27, 2008 05:25:00
There is, indeed, a site at
[Jess in Action]
I agree. Here's the link:
subject: still confused why UnknowHost is NOT fired
servlets and pdf
How to read character stream and byte stream at the same time?
Returning Steams instead of Byte Arrays
Do I need a separate Web Client?
Image transfer through sockets
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013