retrieving 'nulls' from website using Java URL input stream

Posted by Roio on Stack Overflow See other posts from Stack Overflow or by Roio
Published on 2010-05-31T19:52:17Z Indexed on 2010/05/31 20:13 UTC
Read the original article Hit count: 152

Filed under:
|

hi all,

i'm trying to read the text from a website using the Java URL input stream as follows -

URL u = new URL(str);
br3 = new BufferedReader(new InputStreamReader(u.openStream()));
while(true)  
 System.out.println(br3.readLine());

this seems to work fine for most websites, but for some url shortening services like linkbee, the object draws a blank. e.g. http://linkbee.com/FUAKF, i can view the source code using an explorer, however i repeatedly get nulls when i use the above code.

© Stack Overflow or respective owner

Related posts about java

Related posts about url