I am converting an existing Java 1.7 project into 1.6. I have changed diamond operations and try with resources. However 1.7 has some File operations capability that 1.6 does not have. How can I change that lines of code into 1.6:
OutputStream fileStream = Files.newOutputStream(path); //there is no Files class
java.nio.file.Files.createDirectories(outputRoot.toPath()); //there is not toPath() method
also Path class
java.ioclasses directly.new FileOutputStream(path)and the second line can be replaced withoutputRoot.mkdirs()