From the course: AWS for Developers: S3
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Solution: Java SDK operations - Amazon Web Services (AWS) Tutorial
From the course: AWS for Developers: S3
Solution: Java SDK operations
(punchy electronic music) - [Instructor] So now it's time for me to show you my solution to this exercise. Much like I did with the Python example, I used all of the functions we'd already created, and just kind of cascaded through our algorithm. So, we'll start on line 173. I create a new bucket, using that TRANSIENT_BUCKET_NAME. I upload the file F2 to that bucket. I then copy the file F1 from my primary bucket to the transient bucket. On line 176 I'm then going to call listFiles, and store them in a keys list. I'm going to put a output there to just let me know that now we're printing. And I'm going to call a method, print line, on each one of the keys. Then I'm going to call on each of the keys, print line. Then on line 179 I'm going to download a file. So, some of you may have seen an issue here on line 179 when you were downloading the file, if your download directory wasn't clean, because it can't overwrite the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.