Package com.sshtools.daemon.terminal
Class TerminalIO
java.lang.Object
com.sshtools.daemon.terminal.TerminalIO
- All Implemented Interfaces:
PseudoTerminal
- Version:
- $Revision: 1.13 $
- Author:
- $author$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from interface com.sshtools.j2ssh.session.PseudoTerminal
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 Summary
ConstructorsConstructorDescriptionTerminalIO
(InputStream in, OutputStream out, String term, int cols, int rows) -
Method Summary
Modifier and TypeMethodDescriptionvoid
attachStreams
(InputStream in, OutputStream out) void
bell()
void
bindSlaveInputStream
(InputStream slaveIn) void
bindSlaveOutputStream
(OutputStream slaveOut) void
close()
void
void
boolean
defineScrollRegion
(int topmargin, int bottommargin) void
void
void
void
void
void
void
void
flush()
int
int
getEOL()
int
int
getRows()
getTerm()
int
getWidth()
void
boolean
boolean
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
int
read()
void
void
void
setAutoflushing
(boolean b) void
setBackgroundColor
(int color) void
setBlink
(boolean b) void
setBold
(boolean b) void
setCursor
(int row, int col) void
void
setEOL
(int eol) void
setForegroundColor
(int color) void
setItalic
(boolean b) void
setSignalling
(boolean bool) void
setTerminal
(String terminalName) void
setUnderlined
(boolean b) void
void
write
(byte b) void
write
(byte[] sequence) void
write
(char ch) void
write
(int i) void
write
(int[] sequence) void
-
Field Details
-
EOL_CRLF
public static final int EOL_CRLF- See Also:
-
EOL_CR
public static final int EOL_CR- See Also:
-
HOME
public static final int[] HOME -
IOERROR
public static final int IOERROR- See Also:
-
UP
public static final int UP- See Also:
-
DOWN
public static final int DOWN- See Also:
-
RIGHT
public static final int RIGHT- See Also:
-
LEFT
public static final int LEFT- See Also:
-
STORECURSOR
public static final int STORECURSOR- See Also:
-
RESTORECURSOR
public static final int RESTORECURSOR- See Also:
-
EEOL
public static final int EEOL- See Also:
-
EBOL
public static final int EBOL- See Also:
-
EEL
public static final int EEL- See Also:
-
EEOS
public static final int EEOS- See Also:
-
EBOS
public static final int EBOS- See Also:
-
EES
public static final int EES- See Also:
-
ESCAPE
public static final int ESCAPE- See Also:
-
BYTEMISSING
public static final int BYTEMISSING- See Also:
-
UNRECOGNIZED
public static final int UNRECOGNIZED- See Also:
-
ENTER
public static final int ENTER- See Also:
-
TABULATOR
public static final int TABULATOR- See Also:
-
DELETE
public static final int DELETE- See Also:
-
BACKSPACE
public static final int BACKSPACE- See Also:
-
COLORINIT
public static final int COLORINIT- See Also:
-
HANDLED
public static final int HANDLED- See Also:
-
LOGOUTREQUEST
public static final int LOGOUTREQUEST- See Also:
-
LineUpdate
public static final int LineUpdate- See Also:
-
CharacterUpdate
public static final int CharacterUpdate- See Also:
-
ScreenpartUpdate
public static final int ScreenpartUpdate- See Also:
-
EditBuffer
public static final int EditBuffer- See Also:
-
LineEditBuffer
public static final int LineEditBuffer- See Also:
-
BEL
public static final int BEL- See Also:
-
BS
public static final int BS- See Also:
-
DEL
public static final int DEL- See Also:
-
CR
public static final int CR- See Also:
-
LF
public static final int LF- See Also:
-
FCOLOR
public static final int FCOLOR- See Also:
-
BCOLOR
public static final int BCOLOR- See Also:
-
STYLE
public static final int STYLE- See Also:
-
RESET
public static final int RESET- See Also:
-
BOLD
public static final int BOLD- See Also:
-
BOLD_OFF
public static final int BOLD_OFF- See Also:
-
ITALIC
public static final int ITALIC- See Also:
-
ITALIC_OFF
public static final int ITALIC_OFF- See Also:
-
BLINK
public static final int BLINK- See Also:
-
BLINK_OFF
public static final int BLINK_OFF- See Also:
-
UNDERLINED
public static final int UNDERLINED- See Also:
-
UNDERLINED_OFF
public static final int UNDERLINED_OFF- See Also:
-
BLACK
public static final int BLACK- See Also:
-
RED
public static final int RED- See Also:
-
GREEN
public static final int GREEN- See Also:
-
YELLOW
public static final int YELLOW- See Also:
-
BLUE
public static final int BLUE- See Also:
-
MAGENTA
public static final int MAGENTA- See Also:
-
CYAN
public static final int CYAN- See Also:
-
white
public static final int white- See Also:
-
CRLF
- See Also:
-
-
Constructor Details
-
TerminalIO
public TerminalIO(InputStream in, OutputStream out, String term, int cols, int rows) throws IOException - Throws:
IOException
-
-
Method Details
-
getMasterInputStream
- Returns:
-
bindSlaveInputStream
- Parameters:
slaveIn
-
-
bindSlaveOutputStream
- Parameters:
slaveOut
-
-
getSlaveOutputStream
- Returns:
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfacePseudoTerminal
- Returns:
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfacePseudoTerminal
- Returns:
-
getTerm
- Specified by:
getTerm
in interfacePseudoTerminal
- Returns:
-
getEncodedTerminalModes
- Specified by:
getEncodedTerminalModes
in interfacePseudoTerminal
- Returns:
-
getAttachedInputStream
- Throws:
IOException
-
getAttachedOutputStream
- Returns:
- Throws:
IOException
-
detachStreams
public void detachStreams() -
getEOL
public int getEOL()- Returns:
-
getEOLString
- Returns:
-
setEOL
public void setEOL(int eol) - Parameters:
eol
-
-
attachStreams
- Parameters:
in
-out
-
-
read
- Returns:
- Throws:
IOException
-
write
- Parameters:
ch
-- Throws:
IOException
-
write
- Parameters:
str
-- Throws:
IOException
-
println
- Parameters:
str
-- Throws:
IOException
-
println
- Throws:
IOException
-
eraseToEndOfLine
- Throws:
IOException
-
eraseToBeginOfLine
- Throws:
IOException
-
eraseLine
- Throws:
IOException
-
eraseToEndOfScreen
- Throws:
IOException
-
eraseToBeginOfScreen
- Throws:
IOException
-
eraseScreen
- Throws:
IOException
-
moveCursor
- Parameters:
direction
-times
-- Throws:
IOException
-
moveLeft
- Parameters:
times
-- Throws:
IOException
-
moveRight
- Parameters:
times
-- Throws:
IOException
-
moveUp
- Parameters:
times
-- Throws:
IOException
-
moveDown
- Parameters:
times
-- Throws:
IOException
-
setCursor
- Parameters:
row
-col
-- Throws:
IOException
-
homeCursor
- Throws:
IOException
-
storeCursor
- Throws:
IOException
-
restoreCursor
- Throws:
IOException
-
closeInput
- Throws:
IOException
-
write
- Parameters:
b
-- Throws:
IOException
-
write
- Parameters:
i
-- Throws:
IOException
-
write
- Parameters:
sequence
-- Throws:
IOException
-
write
- Parameters:
sequence
-- Throws:
IOException
-
flush
- Throws:
IOException
-
closeOutput
- Throws:
IOException
-
setSignalling
public void setSignalling(boolean bool) - Parameters:
bool
-
-
isSignalling
public boolean isSignalling()- Returns:
-
bell
- Throws:
IOException
-
defineScrollRegion
- Parameters:
topmargin
-bottommargin
-- Returns:
- Throws:
IOException
-
setForegroundColor
- Parameters:
color
-- Throws:
IOException
-
setBackgroundColor
- Parameters:
color
-- Throws:
IOException
-
setBold
- Parameters:
b
-- Throws:
IOException
-
setUnderlined
- Parameters:
b
-- Throws:
IOException
-
setItalic
- Parameters:
b
-- Throws:
IOException
-
setBlink
- Parameters:
b
-- Throws:
IOException
-
resetAttributes
- Throws:
IOException
-
isAutoflushing
public boolean isAutoflushing()- Returns:
-
setAutoflushing
public void setAutoflushing(boolean b) - Parameters:
b
-
-
close
- Throws:
IOException
-
getTerminal
- Returns:
-
setDefaultTerminal
- Throws:
IOException
-
setTerminal
- Parameters:
terminalName
-- Throws:
IOException
-
getRows
public int getRows()- Specified by:
getRows
in interfacePseudoTerminal
- Returns:
-
getColumns
public int getColumns()- Specified by:
getColumns
in interfacePseudoTerminal
- Returns:
-