Esempio n. 1
0
  public static String load(IsoDep tech, Resources res) {
    final Iso7816.Tag tag = new Iso7816.Tag(tech);

    tag.connect();

    PbocCard card = null;

    do {
      if ((card = ShenzhenTong.load(tag, res)) != null) break;

      if ((card = BeijingMunicipal.load(tag, res)) != null) break;

      if ((card = ChanganTong.load(tag, res)) != null) break;

      if ((card = WuhanTong.load(tag, res)) != null) break;

      if ((card = YangchengTong.load(tag, res)) != null) break;

      if ((card = HardReader.load(tag, res)) != null) break;

    } while (false);

    tag.close();

    return (card != null) ? card.toString(res) : null;
  }
Esempio n. 2
0
  protected static ArrayList<byte[]> readLog(Iso7816.Tag tag, int sfi) {
    final ArrayList<byte[]> ret = new ArrayList<byte[]>(MAX_LOG);
    final Iso7816.Response rsp = tag.readRecord(sfi);
    if (rsp.isOkey()) {
      addLog(rsp, ret);
    } else {
      for (int i = 1; i <= MAX_LOG; ++i) {
        if (!addLog(tag.readRecord(sfi, i), ret)) break;
      }
    }

    return ret;
  }
Esempio n. 3
0
 protected PbocCard(Iso7816.Tag tag) {
   id = tag.getID().toString();
 }