Class AbstractPosixTerminal

java.lang.Object
org.jline.terminal.impl.AbstractTerminal
org.jline.terminal.impl.AbstractPosixTerminal
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, Terminal
Direct Known Subclasses:
PosixPtyTerminal, PosixSysTerminal

public abstract class AbstractPosixTerminal extends AbstractTerminal
  • Field Details

    • pty

      protected final Pty pty
    • originalAttributes

      protected final Attributes originalAttributes
  • Constructor Details

  • Method Details

    • getPty

      public Pty getPty()
    • getAttributes

      public Attributes getAttributes()
    • setAttributes

      public void setAttributes(Attributes attr)
    • getSize

      public Size getSize()
      Description copied from interface: Terminal
      Retrieve the size of the visible window
      Returns:
      the visible terminal size
      See Also:
    • setSize

      public void setSize(Size size)
    • doClose

      protected void doClose() throws IOException
      Overrides:
      doClose in class AbstractTerminal
      Throws:
      IOException
    • getCursorPosition

      public Cursor getCursorPosition(IntConsumer discarded)
      Description copied from interface: Terminal
      Query the terminal to report the cursor position. As the response is read from the input stream, some characters may be read before the cursor position is actually read. Those characters can be given back using org.jline.keymap.BindingReader#runMacro(String)
      Specified by:
      getCursorPosition in interface Terminal
      Overrides:
      getCursorPosition in class AbstractTerminal
      Parameters:
      discarded - a consumer receiving discarded characters
      Returns:
      null if cursor position reporting is not supported or a valid cursor position