Jansi is a java library for generating and interpreting ANSI escape sequences.
http://fusesource.github.io/jansi