I want to get the source code from a shoutcast. I read the lines with the code below:
try {
URL game = new URL("http", "somewebsitename", 8013, "index.html");
URLConnection connection = game.openConnection();
BufferedReader in = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
in.close();
} catch (Exception e) {
e.printStackTrace();
}
Instead of getting the source code which I see with Chrome, Firefox or Internet Explorer I get these lines:
ICY 404 Resource Not Found
icy-notice1:
SHOUTcast Distributed Network Audio Server/Linux v1.9.8
icy-notice2:The resource requested was not found
I made sure the the file exists on the server.