Class DumbTerminal

    • Constructor Detail

      • DumbTerminal

        public DumbTerminal​(java.io.InputStream in,
                            java.io.OutputStream out)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • DumbTerminal

        public DumbTerminal​(java.lang.String name,
                            java.lang.String type,
                            java.io.InputStream in,
                            java.io.OutputStream out,
                            java.nio.charset.Charset encoding)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • DumbTerminal

        public DumbTerminal​(TerminalProvider provider,
                            SystemStream systemStream,
                            java.lang.String name,
                            java.lang.String type,
                            java.io.InputStream in,
                            java.io.OutputStream out,
                            java.nio.charset.Charset encoding,
                            Terminal.SignalHandler signalHandler)
                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • reader

        public NonBlockingReader reader()
        Description copied from interface: Terminal
        Retrieve the Reader for this terminal. This is the standard way to read input from this terminal. The reader is non blocking.
        Returns:
        The non blocking reader
      • writer

        public java.io.PrintWriter writer()
        Description copied from interface: Terminal
        Retrieve the Writer for this terminal. This is the standard way to write to this terminal.
        Returns:
        The writer
      • input

        public java.io.InputStream input()
        Description copied from interface: Terminal
        Retrieve the input stream for this terminal. In some rare cases, there may be a need to access the terminal input stream directly. In the usual cases, use the Terminal.reader() instead.
        Returns:
        The input stream
        See Also:
        Terminal.reader()
      • output

        public java.io.OutputStream output()
        Description copied from interface: Terminal
        Retrieve the output stream for this terminal. In some rare cases, there may be a need to access the terminal output stream directly. In the usual cases, use the Terminal.writer() instead.
        Returns:
        The output stream
        See Also:
        Terminal.writer()
      • getAttributes

        public Attributes getAttributes()
        Description copied from interface: Terminal
        Returns the terminal attributes. The returned object can be safely modified further used in a call to Terminal.setAttributes(Attributes).
        Returns:
        the terminal attributes.
      • setAttributes

        public void setAttributes​(Attributes attr)
        Description copied from interface: Terminal
        Set the terminal attributes. The terminal will perform a copy of the given attributes.
        Parameters:
        attr - the new attributes
      • getSize

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

        public void setSize​(Size sz)
      • getProvider

        public TerminalProvider getProvider()
        Description copied from interface: TerminalExt
        Returns the TerminalProvider that created this terminal or null if the terminal was created with no provider.