The Java class TelnetStdioRedirector implements a minimalist embedded Telnet server, that redirects the
standard input/output streams of the Java runtime library (System.in
, out
and err
)
to a connecting Telnet client.
In addition, it provides an interface to read single keystrokes without echo and
optionally without blocking.
It can be used for example to implement:
Since normal i/o through System.in
and System.out
is used to communicate with the
connected Telnet client, the same application program code can also be used
with local console i/o.
Source code: TelnetStdioRedirector.java
Test program: TestTelnetStdioRedirector.java
Author: Christian d'Heureuse (www.source-code.biz, www.inventec.ch/chdh)
Index