Dominik
2
Q:

java read from connection even if 404

HttpURLConnection c = (HttpURLConnection)new URL("http://somesite.com").openConnection();
InputStream in = null;
if (c.getResponseCode() >= 400) {
   in = c.getErrorStream();
}  
else {
   in = c.getInputStream();
}
0

New to Communities?

Join the community