1) createTempFile should create a new file but doesn't why?
2) if I use an existing file is does not write to it why?
it only works if I add the filepath in the constructor of the outputstream.
// Update the string passed to the createTempFile method based on the path to a file on your hard drive
try {
//createTempFile should create a new file but doesn't why?
//if I use an exiting file is does not write to it why?
//it only works if I add the filepath in the contructor of the outputstream.
File yourFile = File.createTempFile("/Users/lilianetop/Desktop/taak2001A", ".txt");
OutputStream outputStream = new FileOutputStream(yourFile);
//OutputStream outputStream = new FileOutputStream("/Users/lilianetop/Desktop/taak2001.txt");
InputStream inputStream = new FileInputStream(yourFile);