Modifier and Type | Field and Description |
---|---|
static String |
AUTO_WRAP_OFF |
static String |
AUTO_WRAP_ON |
static String |
CLEAR_SCREEN |
static String |
CURSOR_OFF |
static String |
CURSOR_ON |
static String |
MOVE |
Constructor and Description |
---|
TerminalImpl(InputStream in,
OutputStream out) |
TerminalImpl(Socket socket) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the screen.
|
void |
close()
Closes the terminal.
|
void |
flush()
Sends all characters in the buffer (if any) to the terminal.
|
int |
get()
Returns the next character sent by the terminal, or -1 if the stream
is closed.
|
int |
get(byte[] buf)
Reads some characters from the terminal and writes them to buffer 'buf'
starting from position 0, and returns the number of characters read,
or -1 if the stream is closed.
|
int |
get(byte[] buf,
int off,
int len)
Reads up to 'len' characters from the terminal and writes them to buffer 'buf'
starting from position 'off', and returns the number of characters read,
or -1 if the stream is closed.
|
int |
getColumns()
Returns the number of columns in the terminal emulator window.
|
int |
getRows()
Returns the number of rows in the terminal emulator window.
|
void |
move(int row,
int column)
Sends the terminal emulator a command to move the cursor
to the given row and column.
|
void |
put(byte c)
Writes one character to the terminal.
|
void |
put(byte[] buf)
Writes buffer 'buf' to the terminal.
|
void |
put(byte[] buf,
int off,
int len)
Writes 'len' characters to the terminal, starting from position 'off'.
|
void |
put(char c)
Writes one character to the terminal.
|
void |
put(int c)
Writes one character to the terminal.
|
void |
put(int row,
int column,
byte c)
Moves the cursor and writes one character to the terminal.
|
void |
put(int row,
int column,
byte[] buf)
Moves the cursor and writes buffer 'buf' to the terminal.
|
void |
put(int row,
int column,
byte[] buf,
int off,
int len)
Moves the cursor and writes 'len' characters to the terminal,
starting from position 'off'.
|
void |
put(int row,
int column,
char c)
Moves the cursor and writes one character to the terminal.
|
void |
put(int row,
int column,
int c)
Moves the cursor and writes one character to the terminal.
|
void |
put(int row,
int column,
String s)
Moves the cursor and writes a string to the terminal.
|
void |
put(String s)
Writes a string to the terminal.
|
void |
resize(int rows,
int columns) |
void |
setCursor(boolean on)
Turns the terminal emulator's cursor on or off.
|
public static final String CLEAR_SCREEN
public static final String CURSOR_OFF
public static final String CURSOR_ON
public static final String MOVE
public static final String AUTO_WRAP_OFF
public static final String AUTO_WRAP_ON
public TerminalImpl(Socket socket) throws IOException
IOException
public TerminalImpl(InputStream in, OutputStream out) throws IOException
IOException
public int getRows()
Terminal
public int getColumns()
Terminal
getColumns
in interface Terminal
public void resize(int rows, int columns)
public void setCursor(boolean on) throws IOException
Terminal
setCursor
in interface Terminal
IOException
public void clear() throws IOException
Terminal
clear
in interface Terminal
IOException
public int get() throws IOException
Terminal
get
in interface Terminal
IOException
public int get(byte[] buf) throws IOException
Terminal
get
in interface Terminal
IOException
public int get(byte[] buf, int off, int len) throws IOException
Terminal
get
in interface Terminal
IOException
public void put(byte[] buf, int off, int len) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(byte[] buf) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(String s) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int c) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(char c) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(byte c) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, byte[] buf, int off, int len) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, byte[] buf) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, String s) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, int c) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, char c) throws IOException
Terminal
put
in interface Terminal
IOException
public void put(int row, int column, byte c) throws IOException
Terminal
put
in interface Terminal
IOException
public void flush() throws IOException
Terminal
flush
in interface Terminal
IOException
public void move(int row, int column) throws IOException
Terminal
move
in interface Terminal
IOException
public void close() throws IOException
Terminal
close
in interface Terminal
IOException
Copyright © 2016. All rights reserved.