@Test public void svReloadCmdBuild_mode_rev3_2_amout_256() { SvReloadCmdBuild svReloadCmdBuild = new SvReloadCmdBuild( PoClass.ISO, PoRevision.REV3_2, 256, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344"), ByteArrayUtil.fromHex("F3EE")); svReloadCmdBuild.finalizeBuilder( ByteArrayUtil.fromHex( "AABBCCDD55667712345611223344556677889900")); String apdu = ByteArrayUtil.toHex(svReloadCmdBuild.getApduRequest().getBytes()); Assert.assertEquals("00B855661C771122F3AAEE0001003344AABBCCDD12345611223344556677889900", apdu); }
public void finalizeBuilder(byte[] reloadComplementaryData) { if ((poRevision == PoRevision.REV3_2 && reloadComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && reloadComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = reloadComplementaryData[4]; byte p2 = reloadComplementaryData[5]; dataIn[0] = reloadComplementaryData[6]; System.arraycopy(reloadComplementaryData, 0, dataIn, 11, 4); System.arraycopy(reloadComplementaryData, 7, dataIn, 15, 3); System.arraycopy(reloadComplementaryData, 10, dataIn, 18, reloadComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); }
SvReloadCmdBuild extends AbstractPoCommandBuilder<SvReloadRespPars> { public void finalizeBuilder(byte[] reloadComplementaryData) { if ((poRevision == PoRevision.REV3_2 && reloadComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && reloadComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = reloadComplementaryData[4]; byte p2 = reloadComplementaryData[5]; dataIn[0] = reloadComplementaryData[6]; System.arraycopy(reloadComplementaryData, 0, dataIn, 11, 4); System.arraycopy(reloadComplementaryData, 7, dataIn, 15, 3); System.arraycopy(reloadComplementaryData, 10, dataIn, 18, reloadComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } }
SvReloadCmdBuild extends AbstractPoCommandBuilder<SvReloadRespPars> { public void finalizeBuilder(byte[] reloadComplementaryData) { if ((poRevision == PoRevision.REV3_2 && reloadComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && reloadComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = reloadComplementaryData[4]; byte p2 = reloadComplementaryData[5]; dataIn[0] = reloadComplementaryData[6]; System.arraycopy(reloadComplementaryData, 0, dataIn, 11, 4); System.arraycopy(reloadComplementaryData, 7, dataIn, 15, 3); System.arraycopy(reloadComplementaryData, 10, dataIn, 18, reloadComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvReloadCmdBuild(
      PoClass poClass,
      PoRevision poRevision,
      int amount,
      byte kvc,
      byte[] date,
      byte[] time,
      byte[] free); }
SvReloadCmdBuild extends AbstractPoCommandBuilder<SvReloadRespPars> { public void finalizeBuilder(byte[] reloadComplementaryData) { if ((poRevision == PoRevision.REV3_2 && reloadComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && reloadComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = reloadComplementaryData[4]; byte p2 = reloadComplementaryData[5]; dataIn[0] = reloadComplementaryData[6]; System.arraycopy(reloadComplementaryData, 0, dataIn, 11, 4); System.arraycopy(reloadComplementaryData, 7, dataIn, 15, 3); System.arraycopy(reloadComplementaryData, 10, dataIn, 18, reloadComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvReloadCmdBuild(
      PoClass poClass,
      PoRevision poRevision,
      int amount,
      byte kvc,
      byte[] date,
      byte[] time,
      byte[] free); void finalizeBuilder(byte[] reloadComplementaryData); byte[] getSvReloadData(); @Override SvReloadRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed(); }
SvReloadCmdBuild extends AbstractPoCommandBuilder<SvReloadRespPars> { public void finalizeBuilder(byte[] reloadComplementaryData) { if ((poRevision == PoRevision.REV3_2 && reloadComplementaryData.length != 20) || (poRevision != PoRevision.REV3_2 && reloadComplementaryData.length != 15)) { throw new IllegalArgumentException("Bad SV prepare load data length."); } byte p1 = reloadComplementaryData[4]; byte p2 = reloadComplementaryData[5]; dataIn[0] = reloadComplementaryData[6]; System.arraycopy(reloadComplementaryData, 0, dataIn, 11, 4); System.arraycopy(reloadComplementaryData, 7, dataIn, 15, 3); System.arraycopy(reloadComplementaryData, 10, dataIn, 18, reloadComplementaryData.length - 10); this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null); } SvReloadCmdBuild(
      PoClass poClass,
      PoRevision poRevision,
      int amount,
      byte kvc,
      byte[] date,
      byte[] time,
      byte[] free); void finalizeBuilder(byte[] reloadComplementaryData); byte[] getSvReloadData(); @Override SvReloadRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed();  }