Categories
Java

Java Compare Two File Byte By Byte

Java example to compare two files byte by byte. We can also do this by calculating MD5 check sum.

Categories
Java

Best Way To Compare Two Text File In Java

Java example to compare contents of two text file line by line using apache commons io library FileUtils class.

Categories
Java

Best To Read Text File In Java

Example for best and safest way to read file to String using apache commons io library.

Categories
Java

Best Way to Check Newer File Java

FileUtils provides six method to compare file modification time. These methods have all required checks and exception handling. For any production grade Java application it is good to use this utility as it will save effort.

Categories
Java

Best Way to Write Strings To File In Java

In Java file writting can be done very efficiently using FileUtils class of Apache Commons IO Java library.

Categories
Java

Java Moving File and Directory to Another Directory

FileUtils provides four method to do file move operation. These methods have all required checks and exception handling. For any production grade Java application it is good to use this utility as it will save effort.

Categories
Java

Java Create New File of Zero Byte Like Linux Touch CMD

In Java easiest way to create new file of Zero byte just like unix touch commanad is using touch method of FileUtils class of Apache Commons IO Java library. Commons IO is well tested library.

Categories
Java

Java Get file size in units like kb mb gb

Get file size in units like kb mb gb using byteCountToDisplaySize method of FileUtils class of Apache commons-io library.

Categories
Java

Java Get Users Home Directory

Get users Home directory in java using FileUtils class of Apache commons-io library.

Categories
Java

Best way to get system temporary directory in Java

Best and safe way to get users temp directory in Java. This can be done using FileUtils class of Apache Commons IO.