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:
    Telnet, TelnetClient
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.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
    • Method Detail

      • getCommand

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