Random Thoughts on Coding
A technical blog on whatever comes to mind
-
What's New In Java 7: Copy and Move Files and Directories
This post is a continuation of my series on the Java 7 java.nio.file package, this time covering the copying and moving of files and complete directory trees. If you have ever been frustrated by Java’s lack of copy and move methods, then read on, for relief is at hand. Included...
-
What's new in Java 7 - The (Quiet) NIO File Revolution
Java 7 (“Project Coin”) has been out since July of last year. The additions with this release are useful, for example Try with resources - having closable resources handled automatically from try blocks, Strings in switch statements, multicatch for Exceptions and the ‘<>’ operator for working with generics. The addition...
-
Event Programming with Google Guava EventBus
It’s a given in any software application there are objects that need to share information in order to get work done. In Java applications, one way of achieving information sharing is to have event listeners, whose sole purpose is to take some action when a desired event occurs. For the...
-
Guava Functions & Java 8 Lambdas
I recently read Brian Goetz’s The State of the Lambda and after reading that article I wanted to try using Java 8 lambda expressions. In his article, Brian goes on to describe interfaces that have one method as “functional” interfaces. Functional interfaces are almost always used as anonymous classes, with...
-
Google Guava Cache
This Post is a continuation of my series on Google Guava, this time covering Guava Cache. Guava Cache offers more flexibility and power than either a HashMap or ConcurrentHashMap, but is not as heavy as using EHCache or Memcached (or robust for that matter, as Guava Cache operates solely in...