| | |
| | | */ |
| | | public static UserCard getBean(List<byte[]> data) { |
| | | try { |
| | | UserCard userCard = new UserCard(); |
| | | |
| | | if (data != null) { |
| | | byte[] zero = data.get(0); |
| | | byte[] one = data.get(1); |
| | | byte[] two = data.get(2); |
| | | if (zero != null && zero.length == 16) { |
| | | UserCard userCard = new UserCard(); |
| | | userCard.cardType = HexUtil.byteToHex(zero[0]); |
| | | userCard.rechargeTimes = HexUtil.get16to10(HexUtil.byteToHex(zero[1])); |
| | | byte[] swipeNumberBytes = new byte[2]; |
| | |
| | | userCard.initPeasantCode = HexUtil.bytesToHex(initPeasantCodeBytes); |
| | | return userCard; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; |