Package org.aesh.terminal.tty.impl
Class CygwinPty
java.lang.Object
org.aesh.terminal.tty.impl.AbstractExecPty
org.aesh.terminal.tty.impl.CygwinPty
- All Implemented Interfaces:
Closeable,AutoCloseable,Pty
PTY implementation for Cygwin environments on Windows.
This class provides pseudo-terminal support when running under Cygwin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Ptycurrent()Returns the PTY for the current terminal.protected StringRetrieves the terminal configuration using the stty command.getAttr()Returns the current terminal attributes.getSize()Returns the current terminal size.Returns the slave side input stream.Returns the slave side output stream.voidsetAttr(Attributes attr) Sets the terminal attributes.Methods inherited from class org.aesh.terminal.tty.impl.AbstractExecPty
close, exec, getMasterInput, getMasterOutput, getName
-
Constructor Details
-
CygwinPty
Constructs a CygwinPty with the specified TTY name.- Parameters:
name- the name of the TTY device
-
-
Method Details
-
current
Returns the PTY for the current terminal.- Returns:
- the current PTY
- Throws:
IOException- if not running in a TTY or an I/O error occurs
-
getSlaveInput
Description copied from interface:PtyReturns the slave side input stream.- Returns:
- the slave input stream
- Throws:
IOException- if an I/O error occurs
-
getSlaveOutput
Description copied from interface:PtyReturns the slave side output stream.- Returns:
- the slave output stream
- Throws:
IOException- if an I/O error occurs
-
getAttr
Description copied from interface:PtyReturns the current terminal attributes.- Returns:
- the terminal attributes
- Throws:
IOException- if an I/O error occurs
-
setAttr
Description copied from interface:PtySets the terminal attributes.- Parameters:
attr- the attributes to set- Throws:
IOException- if an I/O error occurs
-
getSize
Description copied from interface:PtyReturns the current terminal size.- Returns:
- the terminal size
- Throws:
IOException- if an I/O error occurs
-
doGetConfig
Retrieves the terminal configuration using the stty command.- Returns:
- the terminal configuration string
- Throws:
IOException- if an I/O error occurs
-