Package org.jline.terminal.impl
Class ExecPty
- java.lang.Object
-
- org.jline.terminal.impl.AbstractPty
-
- org.jline.terminal.impl.ExecPty
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Pty
public class ExecPty extends AbstractPty implements Pty
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jline.terminal.impl.AbstractPty
AbstractPty.FileDescriptorCreator, AbstractPty.NativeFileDescriptorCreator, AbstractPty.PtyInputStream, AbstractPty.ReflectionFileDescriptorCreator
-
-
Field Summary
Fields Modifier and Type Field Description private TerminalProvider.Stream
console
private java.lang.String
name
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExecPty(java.lang.String name, TerminalProvider.Stream console)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
static Pty
current(TerminalProvider.Stream console)
(package private) static Attributes
doGetAttr(java.lang.String cfg)
protected java.lang.String
doGetConfig()
private static java.lang.Boolean
doGetFlag(java.lang.String cfg, java.lang.Enum<?> flag)
(package private) static int
doGetInt(java.lang.String name, java.lang.String cfg)
(package private) static Size
doGetSize(java.lang.String cfg)
protected java.io.InputStream
doGetSlaveInput()
protected void
doSetAttr(Attributes attr)
Attributes
getAttr()
protected java.util.List<java.lang.String>
getFlagsToSet(Attributes attr, Attributes current)
java.io.InputStream
getMasterInput()
java.io.OutputStream
getMasterOutput()
java.lang.String
getName()
Size
getSize()
java.io.OutputStream
getSlaveOutput()
(package private) static int
parseControlChar(java.lang.String str)
void
setSize(Size size)
java.lang.String
toString()
-
Methods inherited from class org.jline.terminal.impl.AbstractPty
checkInterrupted, getSlaveInput, newDescriptor, setAttr
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jline.terminal.spi.Pty
getSlaveInput, setAttr
-
-
-
-
Field Detail
-
name
private final java.lang.String name
-
console
private final TerminalProvider.Stream console
-
-
Constructor Detail
-
ExecPty
protected ExecPty(java.lang.String name, TerminalProvider.Stream console)
-
-
Method Detail
-
current
public static Pty current(TerminalProvider.Stream console) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getName
public java.lang.String getName()
-
getMasterInput
public java.io.InputStream getMasterInput()
- Specified by:
getMasterInput
in interfacePty
-
getMasterOutput
public java.io.OutputStream getMasterOutput()
- Specified by:
getMasterOutput
in interfacePty
-
doGetSlaveInput
protected java.io.InputStream doGetSlaveInput() throws java.io.IOException
- Specified by:
doGetSlaveInput
in classAbstractPty
- Throws:
java.io.IOException
-
getSlaveOutput
public java.io.OutputStream getSlaveOutput() throws java.io.IOException
- Specified by:
getSlaveOutput
in interfacePty
- Throws:
java.io.IOException
-
getAttr
public Attributes getAttr() throws java.io.IOException
-
doSetAttr
protected void doSetAttr(Attributes attr) throws java.io.IOException
- Specified by:
doSetAttr
in classAbstractPty
- Throws:
java.io.IOException
-
getFlagsToSet
protected java.util.List<java.lang.String> getFlagsToSet(Attributes attr, Attributes current)
-
getSize
public Size getSize() throws java.io.IOException
-
doGetConfig
protected java.lang.String doGetConfig() throws java.io.IOException
- Throws:
java.io.IOException
-
doGetAttr
static Attributes doGetAttr(java.lang.String cfg) throws java.io.IOException
- Throws:
java.io.IOException
-
doGetFlag
private static java.lang.Boolean doGetFlag(java.lang.String cfg, java.lang.Enum<?> flag)
-
parseControlChar
static int parseControlChar(java.lang.String str)
-
doGetSize
static Size doGetSize(java.lang.String cfg) throws java.io.IOException
- Throws:
java.io.IOException
-
doGetInt
static int doGetInt(java.lang.String name, java.lang.String cfg) throws java.io.IOException
- Throws:
java.io.IOException
-
setSize
public void setSize(Size size) throws java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-