Calculating the size of a folder or directory is trivial. In Java you can recursively traverse each folder and calculate the size of each file individually, and return the sum of all the files....
This tutorial show how to make a file readonly. Since Java 1.2 the method file.setReadOnly() is present. Java 6 introduced a new method file.setWritable() both methods can make a file readonly. Make a file...
This tutorial show you how to write text to File using java. We can write text to a file in a couple of ways. First we explore the old way using a BufferedWriter. Next...
This tutorial shows you how to create a file using java. First we explore the old way using the File class. Next we explore the new Path class introduced in Java 7. Create a...
A checksum is used to ensure the integrity of a file after it has been transmitted from one storage device to another. It is a way to ensure that the transmitted file is exactly...