In this post under Apache Commons IO, I will show with example the easiest way to compare whether contents of two files are equal or not. Apache Commons “IOUtils” class provide a static method called “contentEquals” which compare contents of two file and return a boolen. Below is the complete main code Main class package…… Continue reading Checking whether contents of two files are equal or not
Category: IO Utils
Reading file and ignoring its contents
In this post under Apache Commons IO, I will show with example how to read a file and ignore the contents that we have read. In Apache Commons IO framework, we have static utility class “IOUtils”, which has a method “consume” which reads a file and ignore the contents that it has read. Below is…… Continue reading Reading file and ignoring its contents