diff --git a/src/examples/java/software/amazon/nio/spi/examples/CopyToS3.java b/src/examples/java/software/amazon/nio/spi/examples/CopyToS3.java index 8fd759f7..6f930592 100644 --- a/src/examples/java/software/amazon/nio/spi/examples/CopyToS3.java +++ b/src/examples/java/software/amazon/nio/spi/examples/CopyToS3.java @@ -27,5 +27,10 @@ public static void main(String[] args) throws IOException { // Remove the copy option to prevent replacement of an existing file. Files.copy(tempFile, s3Path, StandardCopyOption.REPLACE_EXISTING); + + + // Copy to a local temp file. + final Path tempFile2 = Paths.get(URI.create("file:///tmp/temp2.tmp")); + Files.copy(s3Path, tempFile2); } }