| | |
| | | public byte[] toByte() { |
| | | byte[] data = new byte[16]; |
| | | data[0] = HexUtil.hexToByte(cardType); |
| | | |
| | | byte[] regionBytes = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(region)); |
| | | byte[] regionBytes = new byte[2]; |
| | | byte[] regionDatas = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(region)); |
| | | System.arraycopy(regionDatas, 0, regionBytes, 0, regionDatas.length); |
| | | if (regionBytes != null) { |
| | | System.arraycopy(regionBytes, 0, data, 1, regionBytes.length); |
| | | } |
| | | |
| | | byte[] controllerCodelBytes = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(controllerCodel)); |
| | | byte[] controllerCodelBytes = new byte[2]; |
| | | byte[] controllerCodelDatas = HexUtil.hexToByteArray(HexUtil.get10To16LowHigh(controllerCodel)); |
| | | System.arraycopy(controllerCodelDatas, 0, controllerCodelBytes, 0, controllerCodelDatas.length); |
| | | if (controllerCodelBytes != null) { |
| | | System.arraycopy(controllerCodelBytes, 0, data, 3, controllerCodelBytes.length); |
| | | } |