com.dalsemi.shell.server.telnet
Class TelnetInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--com.dalsemi.shell.server.SystemInputStream
|
+--com.dalsemi.shell.server.telnet.TelnetInputStream
- public class TelnetInputStream
- extends SystemInputStream
This is an input stream to be used by a TelnetSession.
Method Summary |
int |
rawAvailable()
This method should be overridden by subclassing InputStream s. |
protected int |
rawRead()
Read the next character from the stream. |
Methods inherited from class com.dalsemi.shell.server.SystemInputStream |
available,
errorOccurred,
getEcho,
getRootStream,
increaseBuffer,
rawRead,
read,
read,
readLine,
setEcho,
setEchoStream,
setRawMode,
setRootStream,
setSession |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
TelnetInputStream
public TelnetInputStream(InputStream in,
PrintStream out)
- Initialize the stream.
- Parameters:
in
- Underlying InputStream to use.out
- PrintStream to echo characters
rawAvailable
public int rawAvailable()
throws IOException
- Description copied from class: SystemInputStream
- This method should be overridden by subclassing
InputStream
s.
It returns the amount available from the underlying root stream.
This is not the amount available if the SystemInputStream
is not in raw mode.
- Overrides:
- rawAvailable in class SystemInputStream
- Tags copied from class: SystemInputStream
- Returns:
- amount of data available directly from the underlying stream
- Throws:
- IOException - if an error occurs in the underlying stream.
- See Also:
SystemInputStream.setRawMode(boolean)
,
SystemInputStream.rawRead()
,
SystemInputStream.rawRead(byte[],int,int)
rawRead
protected int rawRead()
throws IOException
- Read the next character from the stream. This should
only be called from within a synchronized block.
- Overrides:
- rawRead in class SystemInputStream
- Returns:
- the next character from the stream, or
-1
if the end of the stream has been
reached. - Throws:
- IOException - if an IO problem occurs during
the read.