*
* @throws java.io.IOException
*/
public CapApplet load(CapInputStream in) throws UnableToReadCapFileException {
CapApplet capApplet = new CapApplet();
// AIDLength reading
capApplet.setAidLength(in.readByte());
// aid reading
// first we clear the arrayList
capApplet.getAid().clear();
// and then we read every entries of the arrayList
for (int i = 0; i < capApplet.getAidLength(); i++) {
capApplet.getAid().add(in.readByte());
}
capApplet.setInstallMethodOffset(in.readShort());
return capApplet;
}