How to compress files in ZIP format using Java

  • 24 January 2017
  • ADM

How to compress files in ZIP format using Java. The example takes a folder or file and adds all the files and sub-folders.


How to copy directory in Java

  • 21 January 2017
  • ADM

How to copy a directory and all sub-directories or files in Java. The recursive method used to traverse all the subdirectories.


How to copy files in Java

  • 18 January 2017
  • ADM

How to copy files in Java with three examples: Classic method with streams, using FileChannel class and using Files class.


How to convert Char Array to String in Java

  • 07 December 2016
  • ADM

How to convert Char Array to String in Java. Two simple examples: using String constructor or static valueOf method


How to convert Byte array to String in Java

  • 07 December 2016
  • ADM

How to convert Byte array to String in Java. Simple example using String class.


How to delete directory in Java

  • 19 October 2016
  • ADM

How to delete directory in Java using File.delete() method. Recursive delete is applied if the directory is not empty.