I am currently trying to check a MD5 Hash using the api provided by the following site: https://md5db.net/api/
The following code seems to produce an error and can't find the site. The code does however work for other sites. It just doesn't seem to work with the md5db.net site. Not sure what I am doing wrong.
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
public class FetchURLData {
public static void main(String[] args) {
try {
URL url = new URL("https://md5db.net/api/5d41402abc4b2a76b9719d911017c592");
BufferedReader br = new BufferedReader(newInputStreamReader(url.openStream()));
String strTemp = "";
while (null != (strTemp = br.readLine())) {
System.out.println(strTemp);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}