public class TerminalIO extends java.lang.Object implements PseudoTerminal
Modifier and Type | Field and Description |
---|---|
static int |
BACKSPACE |
static int |
BCOLOR |
static int |
BEL |
static int |
BLACK |
static int |
BLINK |
static int |
BLINK_OFF |
static int |
BLUE |
static int |
BOLD |
static int |
BOLD_OFF |
static int |
BS |
static int |
BYTEMISSING |
static int |
CharacterUpdate |
static int |
COLORINIT |
static int |
CR |
static java.lang.String |
CRLF |
static int |
CYAN |
static int |
DEL |
static int |
DELETE |
static int |
DOWN |
static int |
EBOL |
static int |
EBOS |
static int |
EditBuffer |
static int |
EEL |
static int |
EEOL |
static int |
EEOS |
static int |
EES |
static int |
ENTER |
static int |
EOL_CR |
static int |
EOL_CRLF |
static int |
ESCAPE |
static int |
FCOLOR |
static int |
GREEN |
static int |
HANDLED |
static int[] |
HOME |
static int |
IOERROR |
static int |
ITALIC |
static int |
ITALIC_OFF |
static int |
LEFT |
static int |
LF |
static int |
LineEditBuffer |
static int |
LineUpdate |
static int |
LOGOUTREQUEST |
static int |
MAGENTA |
static int |
RED |
static int |
RESET |
static int |
RESTORECURSOR |
static int |
RIGHT |
static int |
ScreenpartUpdate |
static int |
STORECURSOR |
static int |
STYLE |
static int |
TABULATOR |
static int |
UNDERLINED |
static int |
UNDERLINED_OFF |
static int |
UNRECOGNIZED |
static int |
UP |
static int |
white |
static int |
YELLOW |
CS7, CS8, ECHO, ECHOCTL, ECHOE, ECHOK, ECHOKE, ECHONL, ICANON, ICRNL, IEXTEN, IGNCR, IGNPAR, IMAXBEL, INLCR, INPCK, ISIG, ISTRIP, IUCLC, IXANY, IXOFF, IXON, NOFLSH, OCRNL, OLCUC, ONLCR, ONLRET, ONOCR, OPOST, PARENB, PARMRK, PARODD, PENDIN, TOSTOP, TTY_OP_END, TTY_OP_ISPEED, TTY_OP_OSPEED, VDISCARD, VDSUSP, VEOF, VEOL, VEOL2, VERASE, VFLUSH, VINTR, VKILL, VLNEXT, VQUIT, VREPRINT, VSTART, VSTATUS, VSTOP, VSUSP, VSWTCH, VWERASE, XCASE
Constructor and Description |
---|
TerminalIO(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String term,
int cols,
int rows) |
Modifier and Type | Method and Description |
---|---|
void |
attachStreams(java.io.InputStream in,
java.io.OutputStream out) |
void |
bell() |
void |
bindSlaveInputStream(java.io.InputStream slaveIn) |
void |
bindSlaveOutputStream(java.io.OutputStream slaveOut) |
void |
close() |
void |
closeInput() |
void |
closeOutput() |
boolean |
defineScrollRegion(int topmargin,
int bottommargin) |
void |
detachStreams() |
void |
eraseLine() |
void |
eraseScreen() |
void |
eraseToBeginOfLine() |
void |
eraseToBeginOfScreen() |
void |
eraseToEndOfLine() |
void |
eraseToEndOfScreen() |
void |
flush() |
java.io.InputStream |
getAttachedInputStream() |
java.io.OutputStream |
getAttachedOutputStream() |
int |
getColumns() |
java.lang.String |
getEncodedTerminalModes() |
int |
getEOL() |
java.lang.String |
getEOLString() |
int |
getHeight() |
java.io.InputStream |
getMasterInputStream() |
int |
getRows() |
java.io.OutputStream |
getSlaveOutputStream() |
java.lang.String |
getTerm() |
Terminal |
getTerminal() |
int |
getWidth() |
void |
homeCursor() |
boolean |
isAutoflushing() |
boolean |
isSignalling() |
void |
moveCursor(int direction,
int times) |
void |
moveDown(int times) |
void |
moveLeft(int times) |
void |
moveRight(int times) |
void |
moveUp(int times) |
void |
println() |
void |
println(java.lang.String str) |
int |
read() |
void |
resetAttributes() |
void |
restoreCursor() |
void |
setAutoflushing(boolean b) |
void |
setBackgroundColor(int color) |
void |
setBlink(boolean b) |
void |
setBold(boolean b) |
void |
setCursor(int row,
int col) |
void |
setDefaultTerminal() |
void |
setEOL(int eol) |
void |
setForegroundColor(int color) |
void |
setItalic(boolean b) |
void |
setSignalling(boolean bool) |
void |
setTerminal(java.lang.String terminalName) |
void |
setUnderlined(boolean b) |
void |
storeCursor() |
void |
write(byte b) |
void |
write(byte[] sequence) |
void |
write(char ch) |
void |
write(int i) |
void |
write(int[] sequence) |
void |
write(java.lang.String str) |
public static final int EOL_CRLF
public static final int EOL_CR
public static final int[] HOME
public static final int IOERROR
public static final int UP
public static final int DOWN
public static final int RIGHT
public static final int LEFT
public static final int STORECURSOR
public static final int RESTORECURSOR
public static final int EEOL
public static final int EBOL
public static final int EEL
public static final int EEOS
public static final int EBOS
public static final int EES
public static final int ESCAPE
public static final int BYTEMISSING
public static final int UNRECOGNIZED
public static final int ENTER
public static final int TABULATOR
public static final int DELETE
public static final int BACKSPACE
public static final int COLORINIT
public static final int HANDLED
public static final int LOGOUTREQUEST
public static final int LineUpdate
public static final int CharacterUpdate
public static final int ScreenpartUpdate
public static final int EditBuffer
public static final int LineEditBuffer
public static final int BEL
public static final int BS
public static final int DEL
public static final int CR
public static final int LF
public static final int FCOLOR
public static final int BCOLOR
public static final int STYLE
public static final int RESET
public static final int BOLD
public static final int BOLD_OFF
public static final int ITALIC
public static final int ITALIC_OFF
public static final int BLINK
public static final int BLINK_OFF
public static final int UNDERLINED
public static final int UNDERLINED_OFF
public static final int BLACK
public static final int RED
public static final int GREEN
public static final int YELLOW
public static final int BLUE
public static final int MAGENTA
public static final int CYAN
public static final int white
public static final java.lang.String CRLF
public TerminalIO(java.io.InputStream in, java.io.OutputStream out, java.lang.String term, int cols, int rows) throws java.io.IOException
java.io.IOException
public java.io.InputStream getMasterInputStream()
public void bindSlaveInputStream(java.io.InputStream slaveIn)
slaveIn
- public void bindSlaveOutputStream(java.io.OutputStream slaveOut)
slaveOut
- public java.io.OutputStream getSlaveOutputStream()
public int getWidth()
getWidth
in interface PseudoTerminal
public int getHeight()
getHeight
in interface PseudoTerminal
public java.lang.String getTerm()
getTerm
in interface PseudoTerminal
public java.lang.String getEncodedTerminalModes()
getEncodedTerminalModes
in interface PseudoTerminal
public java.io.InputStream getAttachedInputStream() throws java.io.IOException
java.io.IOException
public java.io.OutputStream getAttachedOutputStream() throws java.io.IOException
java.io.IOException
public void detachStreams()
public int getEOL()
public java.lang.String getEOLString()
public void setEOL(int eol)
eol
- public void attachStreams(java.io.InputStream in, java.io.OutputStream out)
in
- out
- public int read() throws java.io.IOException
java.io.IOException
public void write(char ch) throws java.io.IOException
ch
- java.io.IOException
public void write(java.lang.String str) throws java.io.IOException
str
- java.io.IOException
public void println(java.lang.String str) throws java.io.IOException
str
- java.io.IOException
public void println() throws java.io.IOException
java.io.IOException
public void eraseToEndOfLine() throws java.io.IOException
java.io.IOException
public void eraseToBeginOfLine() throws java.io.IOException
java.io.IOException
public void eraseLine() throws java.io.IOException
java.io.IOException
public void eraseToEndOfScreen() throws java.io.IOException
java.io.IOException
public void eraseToBeginOfScreen() throws java.io.IOException
java.io.IOException
public void eraseScreen() throws java.io.IOException
java.io.IOException
public void moveCursor(int direction, int times) throws java.io.IOException
direction
- times
- java.io.IOException
public void moveLeft(int times) throws java.io.IOException
times
- java.io.IOException
public void moveRight(int times) throws java.io.IOException
times
- java.io.IOException
public void moveUp(int times) throws java.io.IOException
times
- java.io.IOException
public void moveDown(int times) throws java.io.IOException
times
- java.io.IOException
public void setCursor(int row, int col) throws java.io.IOException
row
- col
- java.io.IOException
public void homeCursor() throws java.io.IOException
java.io.IOException
public void storeCursor() throws java.io.IOException
java.io.IOException
public void restoreCursor() throws java.io.IOException
java.io.IOException
public void closeInput() throws java.io.IOException
java.io.IOException
public void write(byte b) throws java.io.IOException
b
- java.io.IOException
public void write(int i) throws java.io.IOException
i
- java.io.IOException
public void write(byte[] sequence) throws java.io.IOException
sequence
- java.io.IOException
public void write(int[] sequence) throws java.io.IOException
sequence
- java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public void closeOutput() throws java.io.IOException
java.io.IOException
public void setSignalling(boolean bool)
bool
- public boolean isSignalling()
public void bell() throws java.io.IOException
java.io.IOException
public boolean defineScrollRegion(int topmargin, int bottommargin) throws java.io.IOException
topmargin
- bottommargin
- java.io.IOException
public void setForegroundColor(int color) throws java.io.IOException
color
- java.io.IOException
public void setBackgroundColor(int color) throws java.io.IOException
color
- java.io.IOException
public void setBold(boolean b) throws java.io.IOException
b
- java.io.IOException
public void setUnderlined(boolean b) throws java.io.IOException
b
- java.io.IOException
public void setItalic(boolean b) throws java.io.IOException
b
- java.io.IOException
public void setBlink(boolean b) throws java.io.IOException
b
- java.io.IOException
public void resetAttributes() throws java.io.IOException
java.io.IOException
public boolean isAutoflushing()
public void setAutoflushing(boolean b)
b
- public void close() throws java.io.IOException
java.io.IOException
public Terminal getTerminal()
public void setDefaultTerminal() throws java.io.IOException
java.io.IOException
public void setTerminal(java.lang.String terminalName) throws java.io.IOException
terminalName
- java.io.IOException
public int getRows()
getRows
in interface PseudoTerminal
public int getColumns()
getColumns
in interface PseudoTerminal
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.