Package org.aesh.terminal.tty.impl
Interface Pty
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractExecPty,CygwinPty,ExecPty
Represents a pseudo-terminal (PTY) providing master/slave input and output streams.
A PTY allows a program to interact with a terminal device, providing both
the master side (for the controlling process) and the slave side (for the terminal).
-
Method Summary
Modifier and TypeMethodDescriptionorg.aesh.terminal.AttributesgetAttr()Returns the current terminal attributes.Returns the master side input stream.Returns the master side output stream.org.aesh.terminal.tty.SizegetSize()Returns the current terminal size.Returns the slave side input stream.Returns the slave side output stream.voidsetAttr(org.aesh.terminal.Attributes attr) Sets the terminal attributes.
-
Method Details
-
getMasterInput
InputStream getMasterInput()Returns the master side input stream.- Returns:
- the master input stream
-
getMasterOutput
OutputStream getMasterOutput()Returns the master side output stream.- Returns:
- the master output stream
-
getSlaveInput
InputStream getSlaveInput()Returns the slave side input stream.- Returns:
- the slave input stream
-
getSlaveOutput
OutputStream getSlaveOutput()Returns the slave side output stream.- Returns:
- the slave output stream
-
getAttr
Returns the current terminal attributes.- Returns:
- the terminal attributes
- Throws:
IOException- if an I/O error occurs
-
setAttr
Sets the terminal attributes.- Parameters:
attr- the attributes to set- Throws:
IOException- if an I/O error occurs
-
getSize
Returns the current terminal size.- Returns:
- the terminal size
- Throws:
IOException- if an I/O error occurs
-