java.io.FileNotFoundException: http://192.168.1.101:80/abc
Hello Friends Im using this program to identify files on web servers for that it should continually try random file names , but when it moves to a unavailable file or a file it gives a error saying file not found ,
is there anyway to continue that without having any errors ?
Code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
URL url = new URL("http://192.168.1.101:80/asd");
BufferedReader in = new BufferedReader
(new InputStreamReader(url.openStream()));
String htmlText;
while ((htmlText = in.readLine()) != null) {
System.out.println(htmlText);
}
in.close();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}