Answer the question
In order to leave comments, you need to log in
How to download a catalog from a web server?
I want to download the contents of the directory, but I get an error - java.io.IOException: Server returned HTTP response code: 403 for URL: https://minecrafttest.ucoz.net/Download/
public static void loadFile() {
try {
URL url = new URL("https://minecrafttest.ucoz.net/Download/");
URLConnection connection = url.openConnection();
File client = new File("C:/Users/pc/Desktop/load/" + "natives");
BufferedInputStream input = new BufferedInputStream(connection.getInputStream());
FileOutputStream output = new FileOutputStream(client);
byte[] buffer = new byte[4096];
int count = 0;
while ((count = input.read(buffer)) != -1) {
output.write(buffer, 0, count);
}
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Answer the question
In order to leave comments, you need to log in
Buy a normal hosting with php/mysql. The "garbage" ucoz will not suit your needs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question