public class ExportComponentRead extends ComponentRead {
@Override
public Component load(CapInputStream in) throws UnableToReadCapFileException {
ExportComponent exportComponent = new ExportComponent();
super.load((byte) ComponentEnum.EXPORT_COMPONENT.getValue(), in, exportComponent);
//we reset the count of byte read to zero
in.resetCount();
exportComponent.setClassCount(in.readByte());
exportComponent.setClassExports(new ArrayList<ClassExportsInfo>());
for (int i = 0; i < exportComponent.getClassCount(); i++) {
ClassExportsInfo cEx = new ClassExportsInfoRead().load(in);
exportComponent.getClassExports().add(cEx);
}
checkSize(in, exportComponent);
return exportComponent;