commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Niemeyer <andreas.nieme...@gutzmann.com>
Subject TelnetClient connections with Linux - suppress chars from OutputStream in InputStream
Date Tue, 30 May 2006 17:33:10 GMT
Hi,

I would like to suppress a command string which is written in the output 
stream and appears in the input stream again.

All works fine with telnet connections to solaris machines.

For instance:

String vRequest = "uname -a ; echo \"#-#-#-#DELIMITER\"";
pOutStream.write((vRequest + "\n").getBytes());
pOutStream.flush();


... returns finally:

uname -a; echo "#-#-#-#-#DELIMITER#-#-#-#-#"
Linux perfmon 2.4.27-3-686-smp #1 SMP Wed Feb 8 12:27:28 UTC 2006 i686 
GNU/Linux


Ok, I could remove the first line as a dirty hack, if it matches with 
the command.

There exists some handlers and I guess with a correct set it might be 
solved.

EchoOptionHandler
TerminalTypeOptionHandler
SuppressGAOptionHandler

I checked out the TelnetClientExample and read around in the javadoc but 
have no clue how to handle this.



Many thanks in advance,
Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message