Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IOException:socket closed

vishnu kulkarni
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam trying to read the contents from the url.
Iam getting IOException:socket closed. Here is the code....

logger.debug(CLASS_NAME,METHOD_NAME,"Entering url" );
URL url = new URL(t_url);
URLConnection urlc = url.openConnection();
//**************URL authentication
urlc.setRequestProperty ("Authorization", "Basic " + encoding);
InputStream content = (InputStream)urlc.getInputStream();

BufferedReader in = new BufferedReader(new InputStreamReader(content));

while((inputLine = in.readLine())!= null)
System.out.println("The inputLine is " + buf.toString());

Could any one please help me out?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic