Class TelnetCommand

java.lang.Object
org.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.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Abort code.
    static final int
    Abort Output code.
    static final int
    Are You There code.
    static final int
    Break code.
    static final int
    Data mark code.
    static final int
    Request to use option code.
    static final int
    Don't use option code.
    static final int
    Erase Character code.
    static final int
    Erase Line code.
    static final int
    End of file code.
    static final int
    End of record code.
    static final int
    Go Ahead code.
    static final int
    Interpret As Command code.
    static final int
    Interrupt Process code.
    static final int
    The maximum value a command code can have.
    static final int
    No Operation code.
    static final int
    Start subnegotiation code.
    static final int
    End subnegotiation code.
    static final int
    Suspend process code.
    static final int
    Synchronize code.
    static final int
    Agree to use option code.
    static final int
    Refuse to use option code.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • getCommand

      public static 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 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.