示例#1
0
  /**
   * Parse a command string
   *
   * @param cmdLine String
   */
  protected final void parseCommandLine(String cmdLine) {

    //	Check if the command has an argument

    int pos = cmdLine.indexOf(' ');
    String cmd = null;

    if (pos != -1) {
      cmd = cmdLine.substring(0, pos);
      m_arg = cmdLine.substring(pos + 1);
    } else cmd = cmdLine;

    //	Validate the FTP command

    m_cmd = FTPCommand.getCommandId(cmd);
  }