Class PosixTerminalInput

  • All Implemented Interfaces:
    TerminalInput

    public class PosixTerminalInput
    extends java.lang.Object
    implements TerminalInput
    Assumes vt100 input control sequences: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream getInputStream()
      Returns an input stream that can be used to read characters from this terminal.
      TerminalInput rawMode()
      Switches this terminal to raw mode.
      void read​(TerminalInputListener listener)
      Reads the next character or control keys from this terminal.
      TerminalInput reset()
      Resets this terminal to its default mode.
      boolean supportsRawMode()
      Returns true if this terminal supports setting raw mode.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PosixTerminalInput

        public PosixTerminalInput()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getInputStream

        public java.io.InputStream getInputStream()
        Description copied from interface: TerminalInput
        Returns an input stream that can be used to read characters from this terminal.
        Specified by:
        getInputStream in interface TerminalInput
      • read

        public void read​(TerminalInputListener listener)
        Description copied from interface: TerminalInput
        Reads the next character or control keys from this terminal. Blocks until an event is available.
        Specified by:
        read in interface TerminalInput
      • supportsRawMode

        public boolean supportsRawMode()
        Description copied from interface: TerminalInput
        Returns true if this terminal supports setting raw mode.
        Specified by:
        supportsRawMode in interface TerminalInput