ByteArrayOutputStream baos = new ByteArrayOutputStream();
DbxEntry.File downloadedFile;
try {
downloadedFile = DropboxAPIFacade.client.getFile(path, null, baos);
} catch (DbxException e) {
throw new DropboxException(path + " does not exist or can't obtain metadata");
} catch (IOException e) {
throw new DropboxException(path + " can't obtain a stream");
}
if (downloadedFile != null) {
resultEntries.put(path, baos);
LOG.info("downloaded path:" + path + " - baos size:" + baos.size());
}