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 get input from Java Console

  • 04 February 2020
  • ADM

How to get input from Java Console. Examples using System.console, Scanner and BufferedReader + InputStreamReader.


Client Server Socket example in Java

  • 13 January 2017
  • ADM

Client Server Socket example in Java. Client example reading the input from the console. Simple echo server example.


GET/POST request with HttpURLConnection in Java

  • 17 October 2016
  • ADM

How to send GET and POST requests using standard HttpURLConnection class from Java. Simple examples for both methods.


How to convert String to InputStream in Java

  • 14 October 2016
  • ADM

Simple example how to convert a String object InputStream object in Java using ByteArrayInputStream class.