How to sleep a thread in Java

  • 21 July 2016
  • ADM

How to sleep a thread in Java using Thread.sleep() method. Comparison between sleep millis an nanos.


How to get free disk space in Java

  • 05 April 2016
  • ADM

How to get free disk space in Java using File.getFreeSpace(), File.getTotalSpace() and File.getUsableSpace().


How to convert byte size into human readable format in java

  • 20 May 2016
  • ADM

How to convert byte sizes into human readable format using Java. Convert from Kilobyte to Yottabyte.


How to create Generic Object Pool in Java

  • 23 March 2016
  • ADM

In a application you can have resources that are limited or time consuming to create a new one. e.g. a connection to a database, a new thread. A solution is to create a the limited resource once and reuse it. To address this problem the object pool pattern was introduced. The object pool design will have the mechanism to create a new object to keep the objects and to destroy the objects if necessary.


How to add delay in SoapUI Response

  • 12 September 2016
  • ADM

When you need to add a delay on your mock service response to simulate a long process or a timeout, you can easily do this by following the steps below.