那请问,我应该怎么修改这个数据结构呢? 结构如下: public class MessagePackage { public String service_type; public String source_address; public String destination_address; public int msgid = 0; public int sm_length; public String short_message_text; public long sequence_no = 0; public long time = 0; public int messagemode; public int sendflag = 0; public MessagePackage(String p_service_type ,String p_source_address ,String p_destination_address ,int msgid ,int p_sm_length ,String p_short_message_text ,int mode ,long sequence) { this.service_type = p_service_type; this.source_address = p_source_address; this.destination_address = p_destination_address; this.sm_length = p_sm_length; this.short_message_text = p_short_message_text; this.messagemode = mode; this.sequence_no = sequence; time = GetcurrentTimeMillis(); } public MessagePackage(long sequence,int msgid,int mode) { } public long GetcurrentTimeMillis() { return System.currentTimeMillis(); } }
结构如下:
public class MessagePackage
{
public String service_type;
public String source_address;
public String destination_address;
public int msgid = 0;
public int sm_length;
public String short_message_text;
public long sequence_no = 0;
public long time = 0;
public int messagemode;
public int sendflag = 0;
public MessagePackage(String p_service_type
,String p_source_address
,String p_destination_address
,int msgid
,int p_sm_length
,String p_short_message_text
,int mode
,long sequence)
{
this.service_type = p_service_type;
this.source_address = p_source_address;
this.destination_address = p_destination_address;
this.sm_length = p_sm_length;
this.short_message_text = p_short_message_text;
this.messagemode = mode;
this.sequence_no = sequence;
time = GetcurrentTimeMillis();
}
public MessagePackage(long sequence,int msgid,int mode)
{ }
public long GetcurrentTimeMillis()
{
return System.currentTimeMillis();
}
}