final class TelnetInputStream extends BufferedInputStream implements Runnable
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
STATE_CR |
(package private) static int |
STATE_DATA |
(package private) static int |
STATE_DO |
(package private) static int |
STATE_DONT |
(package private) static int |
STATE_IAC |
(package private) static int |
STATE_IAC_SB |
(package private) static int |
STATE_SB |
(package private) static int |
STATE_SE |
(package private) static int |
STATE_WILL |
(package private) static int |
STATE_WONT |
in| Constructor and Description |
|---|
TelnetInputStream(InputStream input,
TelnetClient client) |
TelnetInputStream(InputStream input,
TelnetClient client,
boolean readerThread) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
markSupported()
Returns false.
|
int |
read() |
int |
read(byte[] buffer)
Reads the next number of bytes from the stream into an array and returns the number of bytes read.
|
int |
read(byte[] buffer,
int offset,
int length)
Reads the next number of bytes from the stream into an array and returns the number of bytes read.
|
void |
run() |
(package private) void |
start() |
mark, reset, skipstatic final int STATE_CR
static final int STATE_DATA
static final int STATE_DO
static final int STATE_DONT
static final int STATE_IAC
static final int STATE_IAC_SB
static final int STATE_SB
static final int STATE_SE
static final int STATE_WILL
static final int STATE_WONT
TelnetInputStream(InputStream input, TelnetClient client)
TelnetInputStream(InputStream input, TelnetClient client, boolean readerThread)
public int available()
throws IOException
available in class BufferedInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class BufferedInputStreamIOExceptionpublic boolean markSupported()
markSupported in class BufferedInputStreampublic int read()
throws IOException
read in class BufferedInputStreamIOExceptionpublic int read(byte[] buffer)
throws IOException
read in class FilterInputStreambuffer - The byte array in which to store the data.IOException - If an error occurs in reading the underlying stream.public int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class BufferedInputStreambuffer - The byte array in which to store the data.offset - The offset into the array at which to start storing data.length - The number of bytes to read.IOException - If an error occurs while reading the underlying stream.void start()