Card.java
资源名称:J2ME&Game.rar [点击查看]
上传用户:gyyuli
上传日期:2013-07-09
资源大小:3050k
文件大小:1k
源码类别:
J2ME
开发平台:
Java
- package cardclient;
- /**
- * <p>Title: CardClient</p>
- *
- * <p>Description: lizhenpeng</p>
- *
- * <p>Copyright: Copyright (c) 2005</p>
- *
- * <p>Company: LP&P</p>
- *
- * @author lipeng
- * @version 1.0
- */
- public class Card
- {
- public Card()
- {
- id = 0;
- kind = 0;
- num = 0;
- reserved = 0;
- }
- public Card(byte[] data,int index)
- {
- fillData(data,index);
- }
- public byte[] getBytes()
- {
- byte[] data = new byte[4];
- data[0] = id;
- data[1] = kind;
- data[2] = num;
- data[3] = reserved;
- return data;
- }
- public void fillData(byte[] data,int index)
- {
- id = data[index];
- kind = data[index+1];
- num = data[index+2];
- reserved = data[index+3];
- }
- public byte id;
- public byte kind;
- public byte num;
- public byte reserved;
- }