PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/ictclas4j/src/org/ictclas4j/remote/MsgHead.java

http://ictclas4j.googlecode.com/
Java | 33 lines | 24 code | 9 blank | 0 comment | 0 complexity | 650c65f755e3d7522d9d40312a941a11 MD5 | raw file
 1package org.ictclas4j.remote;
 2
 3import com.gftech.util.GFCommon;
 4
 5
 6public class MsgHead {
 7	private int totalLen;
 8
 9	private byte cmdID;
10
11	public byte getCmdID() {
12		return cmdID;
13	}
14
15	public void setCmdID(byte cmdID) {
16		this.cmdID = cmdID;
17	}
18
19	public int getTotalLen() {
20		return totalLen;
21	}
22
23	public void setTotalLen(int totalLen) {
24		this.totalLen = totalLen;
25	} 
26
27	public byte[] getBytes(){
28		byte[] bs=new byte[5];
29		GFCommon.bytesCopy(bs,GFCommon.int2bytes(totalLen),0,4);
30		bs[4]=cmdID;
31		return bs;
32	}
33}