- // System.out.println(">> Download ftp url : " + siftsFileFTPURL);
- URL url = new URL(siftsFileFTPURL);
- URLConnection conn = url.openConnection();
- InputStream inputStream = conn.getInputStream();
- FileOutputStream outputStream = new FileOutputStream(
- downloadedSiftsFile);
- byte[] buffer = new byte[BUFFER_SIZE];
- int bytesRead = -1;
- while ((bytesRead = inputStream.read(buffer)) != -1)
- {
- outputStream.write(buffer, 0, bytesRead);
- }
- outputStream.close();
- inputStream.close();
- // System.out.println(">>> File downloaded : " + downloadedSiftsFile);
+ // System.out.println(">> Download ftp url : " + siftsFileFTPURL);
+ // long now = System.currentTimeMillis();
+ URL url = new URL(siftsFileFTPURL);
+ URLConnection conn = url.openConnection();
+ InputStream inputStream = conn.getInputStream();
+ FileOutputStream outputStream = new FileOutputStream(
+ downloadedSiftsFile);
+ byte[] buffer = new byte[BUFFER_SIZE];
+ int bytesRead = -1;
+ while ((bytesRead = inputStream.read(buffer)) != -1)
+ {
+ outputStream.write(buffer, 0, bytesRead);
+ }
+ outputStream.close();
+ inputStream.close();
+// System.out.println(">>> File downloaded : " + downloadedSiftsFile
+// + " took " + (System.currentTimeMillis() - now) + "ms");