FileOutputStream output = new FileOutputStream(destinationFileLocation);
BufferedOutputStream bufferedOutput = new BufferedOutputStream(output, 4096);
// Request the bits from the server
try {
contentServices.downloadPackageBits(contentContext, key, bufferedOutput, true);
// Verify the file was created correctly
File downloadedFile = new File(destinationFileLocation);
if (!downloadedFile.exists()) {
throw new FileNotFoundException("File to download [" + destinationFileLocation + "] does not exist");