message.java

来自「j2se 平台开发的简单ftp service 代码 学习之用,仅供参考」· Java 代码 · 共 33 行

JAVA
33
字号
package Client;

import java.io.Serializable;
import java.util.ArrayList;

public class Message implements Serializable{

	  public String command = null;
	  public ArrayList paras = new ArrayList() ;
	  public String type = "CMD";
	  
//	  public boolean isLast()
//	  {
//	    // if this is the last message, return true; otherwise, return false
//	  }
	  
	  public String getType()
	  {
		  //  msg  --  MSG
		    //  data --  DATA
		    //  otherwise -- CMD
		  if(this.type.equals("msg"))
			  return "MSG";
		  else if(this.type.equals("data"))
			  return "DATA";
		  else
			  return "CMD";
	  }
	  // your methods here


}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?