Hey guys,
actually I am trying to program a Java application which can enter dropbox, look up which directories and files exist, upload a file and download a directory. Unfortunately I have some problems with the downloading part.
Every time I try to download only a file the it tells me that:
Exception in thread "main" java.io.FileNotFoundException: \test.txt (Zugriff verweigert)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at Dropbox.downloadFile(Dropbox.java:73)
at Main.main(Main.java:15)
But I know that this file exists. here is the code for the downloading function
public void downloadFile(String path) throws ListFolderErrorException, DbxException, IOException
{
FileOutputStream out = new FileOutputStream("/test.txt");
DbxDownloader<FileMetadata> downloader = null;
FileMetadata response;
response = downloader.getResult();
try {
InputStream in = downloader.getInputStream();
} finally {
downloader.close();
}
}
Can someonehelp me with that? I can't really find an answer in web.