el trozo de codigo que utilizo para descargar es el siguiente:
Código:
alguien se le ocurre como solucionarlo? gracias por adelantado public static boolean downloadFileByhttp(String server, String localPath, String remotePath) {
try {
URL url = new URL("http://" + server + remotePath);
URLConnection urlc = url.openConnection();
InputStream is = urlc.getInputStream();
BufferedWriter bw = new BufferedWriter(new FileWriter(localPath));
int c;
while ((c = is.read()) != -1) {
bw.write(c);
}
is.close();
bw.flush();
bw.close();
return true;
} catch (Exception ex) {
ex.printStackTrace();
System.out.println(ex.getMessage());
return false;
}
}

