org.apache.commons.net.telnet

Class TelnetCommand


public final class TelnetCommand
extends java.lang.Object

The TelnetCommand class cannot be instantiated and only serves as a storehouse for telnet command constants.

See Also:
org.apache.commons.net.telnet.Telnet, TelnetClient

Field Summary

static int
ABORT
Abort code.
static int
AO
Abort Output code.
static int
AYT
Are You There code.
static int
BREAK
Break code.
static int
DM
Data mark code.
static int
DO
Request to use option code.
static int
DONT
Don't use option code.
static int
EC
Erase Character code.
static int
EL
Erase Line code.
static int
EOF
End of file code.
static int
EOR
End of record code.
static int
GA
Go Ahead code.
static int
IAC
Interpret As Command code.
static int
IP
Interrupt Process code.
static int
MAX_COMMAND_VALUE
The maximum value a command code can have.
static int
NOP
No Operation code.
static int
SB
Start subnegotiation code.
static int
SE
End subnegotiation code.
static int
SUSP
Suspend process code.
static int
SYNCH
Synchronize code.
static int
WILL
Agree to use option code.
static int
WONT
Refuse to use option code.

Method Summary

static String
getCommand(int code)
Returns the string representation of the telnet protocol command corresponding to the given command code.
static boolean
isValidCommand(int code)
Determines if a given command code is valid.

Field Details

ABORT

public static final int ABORT
Abort code. Value is 238. **

Field Value:
238


AO

public static final int AO
Abort Output code. Value is 245 according to RFC 854. **

Field Value:
245


AYT

public static final int AYT
Are You There code. Value is 246 according to RFC 854. **

Field Value:
246


BREAK

public static final int BREAK
Break code. Value is 243 according to RFC 854. **

Field Value:
243


DM

public static final int DM
Data mark code. Value is 242 according to RFC 854. **

Field Value:
242


DO

public static final int DO
Request to use option code. Value is 253 according to RFC 854. **

Field Value:
253


DONT

public static final int DONT
Don't use option code. Value is 254 according to RFC 854. **

Field Value:
254


EC

public static final int EC
Erase Character code. Value is 247 according to RFC 854. **

Field Value:
247


EL

public static final int EL
Erase Line code. Value is 248 according to RFC 854. **

Field Value:
248


EOF

public static final int EOF
End of file code. Value is 236. **

Field Value:
236


EOR

public static final int EOR
End of record code. Value is 239. **

Field Value:
239


GA

public static final int GA
Go Ahead code. Value is 249 according to RFC 854. **

Field Value:
249


IAC

public static final int IAC
Interpret As Command code. Value is 255 according to RFC 854. **

Field Value:
255


IP

public static final int IP
Interrupt Process code. Value is 244 according to RFC 854. **

Field Value:
244


MAX_COMMAND_VALUE

public static final int MAX_COMMAND_VALUE
The maximum value a command code can have. This value is 255. **

Field Value:
255


NOP

public static final int NOP
No Operation code. Value is 241 according to RFC 854. **

Field Value:
241


SB

public static final int SB
Start subnegotiation code. Value is 250 according to RFC 854. **

Field Value:
250


SE

public static final int SE
End subnegotiation code. Value is 240 according to RFC 854. **

Field Value:
240


SUSP

public static final int SUSP
Suspend process code. Value is 237. **

Field Value:
237


SYNCH

public static final int SYNCH
Synchronize code. Value is 242. **

Field Value:
242


WILL

public static final int WILL
Agree to use option code. Value is 251 according to RFC 854. **

Field Value:
251


WONT

public static final int WONT
Refuse to use option code. Value is 252 according to RFC 854. **

Field Value:
252

Method Details

getCommand

public static final String getCommand(int code)
Returns the string representation of the telnet protocol command corresponding to the given command code.

Parameters:
code - The command code of the telnet protocol command.

Returns:
The string representation of the telnet protocol command.


isValidCommand

public static final boolean isValidCommand(int code)
Determines if a given command code is valid. Returns true if valid, false if not.

Parameters:
code - The command code to test.

Returns:
True if the command code is valid, false if not.