-
zip
List contents of zip file
In this example we shall show you how to get the list of the contents of a zip file, with…
Read More » -
zip
Get zip entry compression method
This is an example of how to get the ZipEntry Compression method. The compression method of a ZipEntry can be…
Read More » -
zip
Compress Objects example
With this example we are going to demonstrate how to compress and expand an Object. We have implemented the ObjectCompressionUtil…
Read More » -
concurrent
CountDownLatch example of a more general wait/notify mechanism
In this example we shall show you how to create a CountDownLatch of a more general wait/notify mechanism. We have…
Read More » -
concurrent
Blocking Queue example of limited connection pool
private BlockingQueue<Connection> pool = new ArrayBlockingQueue<Connection>(10); private AtomicInteger connCount = new AtomicInteger(); public Connection getConnection() { Connection conn = pool.poll(5,…
Read More » -
concurrent
Reentrant Lock example of a task runner
With this example we are going to demonstrate how to implement a ReentrantLock of a task runner. The ReentrantLock is…
Read More » -
concurrent
Semaphores example limiting URL connections
In this example we shall show you how to use a Semaphore for limiting URL connections. We have implemented a…
Read More » -
Preferences
Store preferences to user space
This is an example of how to store Preferences to user space. The Preferences class allows applications to store and retrieve…
Read More » -
XPath
Find elements by id with XPath
With this example we are going to demonstrate how to find elements by Id using XPath. The XPath language provides…
Read More » -
XPath
Find elements by attributes with XPath
In this example we shall show you how to find elements by attributes using XPath. The XPath language provides a…
Read More »