public class TelnetInputStream
extends java.io.InputStream
Constructor and Description |
---|
TelnetInputStream(Telnet tn,
java.io.InputStream in)
Creates a new TelnetInputStream object.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input stream.
|
void |
flush()
Reads until the amount of data available is greater than 0 bytes
|
java.io.InputStream |
getStream()
Returns underlying stream.
|
void |
mark(int readlimit)
Marks the current position in this input stream.
|
boolean |
markSupported()
Checks if mark is supported in this TelnetInputStream
|
int |
read()
Read data from telnet stream with escaping control characters.
|
int |
read(byte[] b)
Read data from telnet stream with escaping control characters.
|
int |
read(byte[] b,
int off,
int len)
Read data from telnet stream with escaping control characters.
|
java.lang.String |
readBlock(java.lang.String[] lbr)
Reads from the stream.
|
java.lang.String |
readLine(java.lang.String[] lbr)
Reads from the stream.
|
void |
reset()
Repositions this stream to the position at the time the mark method was
last called on this input stream.
|
long |
skip(long n)
Skips over and discards n bytes of data from this input stream.
|
int |
tread()
Read data from telnet stream without escaping control characters.
|
public TelnetInputStream(Telnet tn, java.io.InputStream in)
tn
- a Telnetin
- an InputStreampublic java.io.InputStream getStream()
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- if an I/O related error occurspublic int tread() throws java.io.IOException
java.io.IOException
- if an I/O related error occurspublic int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
b
- buffer to read data fromjava.io.IOException
- if an I/O related error occurspublic int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
b
- buffer to read data fromoff
- offset in buffer to start reading fromlen
- length of data to read from offsetjava.io.IOException
- if an I/O related error occurspublic boolean markSupported()
markSupported
in class java.io.InputStream
public long skip(long n) throws java.io.IOException
skip
in class java.io.InputStream
n
- the number of bytes to skipjava.io.IOException
- if an I/O error occursInputStream.skip(long)
public void mark(int readlimit)
mark
in class java.io.InputStream
readlimit
- the maximum limit of bytes that can be read before the mark position becomes invalid.InputStream.mark(int)
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
- if an I/O error occurs.InputStream.available()
public void flush() throws java.io.IOException
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
- if an I/O related error occursInputStream.reset()
public java.lang.String readLine(java.lang.String[] lbr) throws java.io.IOException
lbr
- Line break sequences the method is expected to recognisejava.io.IOException
- if an I/O related error occurspublic java.lang.String readBlock(java.lang.String[] lbr) throws java.io.IOException
lbr
- Array of strings to match againstjava.io.IOException
- if an I/O error occursCopyright © JSCAPE LLC. 1999-2021. All Rights Reserved