Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void downloadFiles(List<String> filenames, final String fileSavePath) {
- if (filenames != null && filenames.size() > 0) {
- List<Callable<Void>> jobs = new ArrayList();
- for (final String fileName : filenames) {
- jobs.add(new Callable() {
- public Void call() throws Exception {
- downloadFile(fileName, fileSavePath);
- return null;
- }
- });
- }
- performJobs(jobs);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement