FileDocCategorySizeDatePackage
TelnetCommand.javaAPI DocApache Commons NET 1.4.1 API4547Sat Dec 03 10:05:50 GMT 2005org.apache.commons.net.telnet

TelnetCommand

public final class TelnetCommand extends Object
The TelnetCommand class cannot be instantiated and only serves as a storehouse for telnet command constants.
author
Daniel F. Savarese
see
org.apache.commons.net.telnet.Telnet
see
org.apache.commons.net.telnet.TelnetClient

Fields Summary
public static final int
MAX_COMMAND_VALUE
The maximum value a command code can have. This value is 255.
public static final int
IAC
Interpret As Command code. Value is 255 according to RFC 854.
public static final int
DONT
Don't use option code. Value is 254 according to RFC 854.
public static final int
DO
Request to use option code. Value is 253 according to RFC 854.
public static final int
WONT
Refuse to use option code. Value is 252 according to RFC 854.
public static final int
WILL
Agree to use option code. Value is 251 according to RFC 854.
public static final int
SB
Start subnegotiation code. Value is 250 according to RFC 854.
public static final int
GA
Go Ahead code. Value is 249 according to RFC 854.
public static final int
EL
Erase Line code. Value is 248 according to RFC 854.
public static final int
EC
Erase Character code. Value is 247 according to RFC 854.
public static final int
AYT
Are You There code. Value is 246 according to RFC 854.
public static final int
AO
Abort Output code. Value is 245 according to RFC 854.
public static final int
IP
Interrupt Process code. Value is 244 according to RFC 854.
public static final int
BREAK
Break code. Value is 243 according to RFC 854.
public static final int
DM
Data mark code. Value is 242 according to RFC 854.
public static final int
NOP
No Operation code. Value is 241 according to RFC 854.
public static final int
SE
End subnegotiation code. Value is 240 according to RFC 854.
public static final int
EOR
End of record code. Value is 239.
public static final int
ABORT
Abort code. Value is 238.
public static final int
SUSP
Suspend process code. Value is 237.
public static final int
EOF
End of file code. Value is 236.
public static final int
SYNCH
Synchronize code. Value is 242.
private static final String[]
__commandString
String representations of commands.
private static final int
__FIRST_COMMAND
private static final int
__LAST_COMMAND
Constructors Summary
private TelnetCommand()

 
Methods Summary
public static final java.lang.StringgetCommand(int code)
Returns the string representation of the telnet protocol command corresponding to the given command code.

param
code The command code of the telnet protocol command.
return
The string representation of the telnet protocol command.


                                            
         
    
        return __commandString[__FIRST_COMMAND - code];
    
public static final booleanisValidCommand(int code)
Determines if a given command code is valid. Returns true if valid, false if not.

param
code The command code to test.
return
True if the command code is valid, false if not.

        return (code <= __FIRST_COMMAND && code >= __LAST_COMMAND);