Reading ANSI escape sequences is nitty gritty and very easy to get wrong. I am after a library that includes an abstraction for reading escaped sequences preferrably as instances of some nice type. It would be nice if the library offered strongly types rather than everything is a strong and good luck do the stuff yourself.
Any pointers to a foss library would be appreciated.
A similar question A library to convert ANSI escapes (terminal formatting/color codes) to HTML which seems to have a similar motivation also remains unanswered.
c00kiemon5ter
You may want to take a look at Jansi.
Here is the homepage and github repo
I hope that helps.
来源:https://stackoverflow.com/questions/6520116/java-framework-for-reading-writing-ansi-escape-sequenced-character-streams