Unbuffered input and ANSI output support for Linux, MacOS, or Windows for Java 6+
Go to file
2014-11-16 21:07:03 +01:00
src/dorkbox/util/input Formatted code to GoogleCodeStyle. Fixed misc warnings 2014-11-16 21:07:03 +01:00
.classpath Updated license information. Polished release/dist process. Updated readme info 2014-11-04 11:58:50 +01:00
.gitignore Basic setup + adding libraries 2014-10-24 20:38:16 +02:00
.project Updated name 2014-10-24 23:04:10 +02:00
LICENSE Updated license information. Polished release/dist process. Updated readme info 2014-11-04 11:58:50 +01:00
LICENSE.Apachev2 Changed license filenames to be lexicographical ordered 2014-11-16 15:24:33 +01:00
LICENSE.BSD Changed license filenames to be lexicographical ordered 2014-11-16 15:24:33 +01:00
LICENSE.MIT Changed license filenames to be lexicographical ordered 2014-11-16 15:24:33 +01:00
README.md Readme formatting 2014-11-04 12:08:44 +01:00

InputConsole

Unbuffered input on the console for java applications.

This small library is very similar to what JLine provides, however it does 4 things very differently:

  1. Only provides unbuffered input.
  • Backspace functionality for line input is preserved.
  • Ctrl-C (SIGINT) is also preserved in windows
  1. Uses native calls via JNA (instead of shell execution) for linux & mac terminal configuration
  2. Supports unsupported teminals (for example, while in an IDE ), so in.read() will still return (a line is split into chars, then fed to consumer). The enter key must still be pressed.
  3. Multi-threaded, intelligent buffering of command input for simultaneous input readers on different threads
  • This is for cross-platform use, specifically - linux 32/64, mac 32/64, and windows 32/64. Java 6+
  • ANSI output to console is also supported, and is required for backspace functionality to work if echo is enabled.
Note: If you use the attached JNA/JAnsi libraries, you **MUST** load the respective
      native libraries yourself, especially with JNA (as the loading logic has
      been removed from the jar)
Note: This project was inspired (and some parts heavily modified) by the excellent 
      JLine library, and includes utility classes/methods from a variety of sources.