I am talking to a device via a telnet connection (telnet client from apache), the device requires us to send a CTRL-B to go into a certain mode. How can I send that via java?
+4
A:
Ctrl-B is just the byte 2
.
Given an OutputStream out
, out.write(2);
.
Function keys and the like will have escape sequences, exactly what sequence is determined by which terminal you have negotiated to emulate.
Tom Hawtin - tackline
2010-01-13 20:50:44