I'm trying to get HTML by URL in Java. But 301 Moved Permanently
is all that I've got. Another URLs work. What's wrong? This is my code:
hh= new URL("http://hh.ru");
in = new BufferedReader(
new InputStreamReader(hh.openStream()));
while ((inputLine = in.readLine()) != null) {
sb.append(inputLine).append("
");
str=sb.toString();//returns 301
}
See Question&Answers more detail:os