class 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);
  }

  public  SvReloadCmdBuild(
      PoClass poClass,
      PoRevision poRevision,
      int amount,
      byte kvc,
      byte[] date,
      byte[] time,
      byte[] free);

}