I have a Solaris daemon written in Java6. Clients can connect to it using a telnet style interface. They telnet to a particular port, and I read lines of input and act on them.
At one point in I need to prompt the user to enter a password, and while they’re entering that I want to disable the echoing of characters back to the telnet client.
The code has a Socket object and creates an InputStream from the socket’s getInputStream() result, then reads and buffers characters from the InputStream, breaking them up on cr/lf boundaries.
I can’t see any attributes on either the InputStream or the Socket to disable the echoing of characters back to the client.
Can someone nudge me in the right direction?
Sounds like you need to build a simple Network Virtual Terminal that supports the no echo etc commands. There is already a good answer you should refer to on SO : Telnet Server