Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public void downloadFiles(List<String> filenames, final String fileSavePath) {
  2. if (filenames != null && filenames.size() > 0) {
  3. List<Callable<Void>> jobs = new ArrayList();
  4. for (final String fileName : filenames) {
  5. jobs.add(new Callable() {
  6. public Void call() throws Exception {
  7. downloadFile(fileName, fileSavePath);
  8. return null;
  9. }
  10. });
  11. }
  12. performJobs(jobs);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement