This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

get IOException over Proxy

 
Mathias Andrae
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new in socket programming.
I only want to receive a document from an URL.
Doing it in the intranet works fine. But doing it over the proxy from the WWW it gives an IOException.
I suppose the proxy is the cause for it.
Any idea what I have to do??
Here my simple source:
 
Karthik Banda
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dear,
just include two more lines of code and try with it as below. As you are not thrown any Security Excpeption while doing this, there is no problem as such in using a proxy. But, may be this is the problem with your Buffer size on the network which may be causing this. so try with this..
try
{
URLConnection con=url.openConnection();
InputStream is=con.getInputStream();
/*
now pass this "is" into the constructor of BufferedReader and also give the buffer size say around 512
*/
}
and try with this and please let me know tyhe result at karthik@electricangels.com
Regards,
karthik
 
Maybe he went home and went to bed. And took this tiny ad with him:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!