Creating, Writing, Reading files using Java Files API of Java 7

posted by anishaanisha 728 days, 13 hours, 34 minutes ago
Wednesday, July 25, 2012 12:37:09 PM GMT

In our previous post we did get a taste of the power of the static APIs in the JavaFiles class and we managed to compare the code written without using the APIs in Java Files and with using the APIs in Java Files. In this post let me delve further into the other APIs offered by Java Files class and look at the creation, deletion of files and reading and writing to the files. Creating and Deleting a file: //Create a new Path Path newFile = Paths.get("test1"); try { Files.deleteIfExists(newFile); ...

category: Java EE | clicked: 1 | | source: www.javabeat.net | show counter code
tags: creating, Java 7, java file API, reading, writing

To post comments using your Facebook,Twitter, Gmail etc credentials in the Discus comments section. Or use your Javapins credentials at the end of the page.
To post your comment as a Javapins user please login or signup to Javapins database.