-
Calendar
Add/Subtract Hours from Date with Calendar
In this example we shall show you how to add and substract Hours from a Date with the Calendar class.…
Read More » -
Calendar
Add/Subtract Days from Date with Calendar
This is an example of how to add and subtract Days from a Date using the Calendar, that provides methods…
Read More » -
zip
Create zip file from multiple files with ZipOutputStream
With this example we are going to demonstrate how to create a zip file from multiple Files with ZipOutputStream, that…
Read More » -
zip
Create zip file from directory with ZipOutputStream
In this example we shall show you how to create a zip file from a directory with ZipOutputStream class, that…
Read More » -
zip
Search file in a zip file
This is an example of how to search a File in a zip file, using the ZipFile class. Searching a…
Read More » -
zip
Calculate CRC-32 checksum of zip entry
With this example we are going to demonstrate how to calculate the CRC-32 checksum of a ZipEntry. In short, to…
Read More » -
zip
Calculate CRC32 checksum for byte array
In this example we shall show you how to calculate the CRC32 Checksum of a byte array. To calculate the…
Read More » -
zip
Compress – Decompress files example
This is an example of how to zip and unzip a file. We have implemented the FileCompressionUtil class, that consists…
Read More » -
concurrent
Synchronous Queue example to execute commands
private BlockingQueue workQueue = new LinkedBlockingQueue(); private Map commandQueueMap = new ConcurrentHashMap(); public SynchronousQueue addCommand(Command command) { SynchronousQueue queue =…
Read More » -
concurrent
Blocking Queue example to execute commands
import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; private BlockingQueue<Command> workQueue = new LinkedBlockingQueue<Command>(); public void addCommand(Command command) { workQueue.offer(command); } public Object call()…
Read More »