Our website loads in split second powered by Schema Theme. Thanks to MyThemeShop

Tag: Files-IO

Rename a File in Java

To rename file name, we use  method in file. Call method on old file handle and pass new file handle to the method as parameter. Using method we can also move file from one directory to the other desired directory …


Delete a File in Java

To delete a file in Java, get the file handle to the file that you want to delete. To delete a file in particular directory, Construct File Path to that file, get the file handle to delete the file using …


Java 7 read file to String

Before Java7, reading a file in Java and convert to a String, used to require a lot of code either using FileInputStream or BufferReader with looping conditions. Of course, we might have used this by writing as a Utility method …