Dropbox API Downloading a file using the Dropbox Java library


Example

This uses the Dropbox Java SDK to download a file from the Dropbox API at the remote path /Homework/math/Prime_Numbers.txt to the local file Prime_Numbers.txt:

String localPath = "Prime_Numbers.txt";
OutputStream outputStream = new FileOutputStream(localPath);
FileMetadata metadata = client.files()
        .downloadBuilder("/Homework/math/Prime_Numbers.txt")
        .download(outputStream);