Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IOException:socket closed  RSS feed

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
Boost this thread!