Rocking out with Google Guava

Joinville · August 08, 2012

According to the project site on GitHub, The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth.

I'll show you some cool features that could make you like Guava Libraries even more:

Collection<String> lines = Files.readLines(mytxtFile, Charsets.UTF8);

Simple, uh?

Iterable<String> columns = Splitter

Pretty easy :)

String phoneNumber = CharMatcher
  .retainFrom("my phone number is 123456789");

These are, IMHO, the best features in Guava. But, there is much more.

If you want to use it in a maven project, just add to your pom.xml:


If you are not using maven, you can download the last version in this page.

Cool links

The project still active, the last release (19) is from Dec 2015.

That's all. Cheers.