Modifier and Type | Field and Description |
---|---|
private net.wimpi.telnetd.net.Connection |
conn
.
|
private net.wimpi.telnetd.io.BasicTerminalIO |
termIO
.
|
private boolean |
useAlternate
.
|
Constructor and Description |
---|
TelnetIO(net.wimpi.telnetd.net.Connection conn) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
cls()
Clear screen.
|
CodeType |
decode(int code)
Decode the intput value.
|
void |
flush()
Flush output.
|
int |
getHeight()
Returns the term height in chars.
|
String |
getProperty(String name)
Retrieves the value of a property specified by this TermIO
|
int |
getWidth()
Returns the term width in chars.
|
boolean |
moveLeft()
Move the cursor left.
|
boolean |
moveRight(char c)
Move the cursor right.
|
int |
read()
Reads an input value.
|
boolean |
releaseAlternateBuffer()
Release control of the alternate buffer.
|
boolean |
takeAlternateBuffer()
Take control of the alternate buffer.
|
void |
write(char c)
Write a char.
|
void |
write(CharSequence s)
Write a string.
|
void |
write(Style style)
Write a style.
|
void |
writeCRLF()
Write a CRLF.
|
void |
writeDel()
Delete the char under the cursor.
|
private final net.wimpi.telnetd.net.Connection conn
private final net.wimpi.telnetd.io.BasicTerminalIO termIO
private boolean useAlternate
public TelnetIO(net.wimpi.telnetd.net.Connection conn)
public int read() throws IOException
TermIO
read
in interface TermIO
IOException
- any io exceptionpublic int getWidth()
TermIO
public int getHeight()
TermIO
public String getProperty(String name)
TermIO
getProperty
in interface TermIO
name
- the name of the propertypublic boolean takeAlternateBuffer() throws IOException
TermIO
TermIO.flush()
method
is invoked.takeAlternateBuffer
in interface TermIO
IOException
public boolean releaseAlternateBuffer() throws IOException
TermIO
TermIO.flush()
method
is invoked.releaseAlternateBuffer
in interface TermIO
IOException
public CodeType decode(int code)
TermIO
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void flush() throws IOException
TermIO
flush
in interface TermIO
IOException
- any io exceptionpublic void write(CharSequence s) throws IOException
TermIO
write
in interface TermIO
s
- the string to writeIOException
- any io exceptionpublic void write(Style style) throws IOException
TermIO
write
in interface TermIO
style
- the data to writeIOException
- any io exceptionpublic void write(char c) throws IOException
TermIO
write
in interface TermIO
c
- the char to writeIOException
- any io exceptionpublic void writeDel() throws IOException
TermIO
writeDel
in interface TermIO
IOException
- any io exceptionpublic void writeCRLF() throws IOException
TermIO
writeCRLF
in interface TermIO
IOException
- any io exceptionpublic boolean moveRight(char c) throws IOException
TermIO
moveRight
in interface TermIO
c
- the char skipped overIOException
- any io exceptionpublic boolean moveLeft() throws IOException
TermIO
moveLeft
in interface TermIO
IOException
- any io exceptionpublic void cls() throws IOException
TermIO
cls
in interface TermIO
IOException
- any io exceptionCopyright © 2015 eXo Platform SAS. All Rights Reserved.