thanks a lot hans,
I got it to work with the following code:
try {
InputStream is = file.getInputStream();
OutputStream outputStream = new FileOutputStream("c:\\" +
file.getFilename());
int data;
while((data=is.read()) != -1){
outputStream.write(data);
}
is.close();
outputStream.close();
} catch (IOException ex) {
ex.printStackTrace();
}

