com.payneteasy.tlv.BerTlvs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ber-tlv Show documentation
Show all versions of ber-tlv Show documentation
BER-TLV reader and writer
package com.payneteasy.tlv;
import java.util.ArrayList;
import java.util.List;
public class BerTlvs {
protected BerTlvs(List aTlvs) {
tlvs = aTlvs;
}
public BerTlv find(BerTag aTag) {
for (BerTlv tlv : tlvs) {
BerTlv found = tlv.find(aTag);
if(found!=null) {
return found;
}
}
return null;
}
public List findAll(BerTag aTag) {
List list = new ArrayList();
for (BerTlv tlv : tlvs) {
list.addAll(tlv.findAll(aTag));
}
return list;
}
public List getList() {
return tlvs;
}
private final List tlvs;
}