i'm getting IOException while getting InputStream from URLConnection,
but the document exists on that url location i've tested in Internet explorer and other applications. my code is below.
can anyone help me in this regards, that why this error happened in java, while using the same url in browser displays the contents of this file. also to solve this problem.
java.net.URL thisURL = null;
InputStream inStream = null;
thisURL = new java.net.URL(http://groups.google.com.pk/group/Java--XML/feed/topics.xml
URLConnection connection = thisURL.openConnection();
inStream = connection.getInputStream(
catch (UnknownHostException e)
catch (IOException e)
System.out.println("Error in opening URLConnection, Reading or Writing");