*
*/
@Override
public Component load(CapInputStream in) throws UnableToReadCapFileException {
HeaderComponent headerComponent = new HeaderComponent();
// we first read tag and size
super.load((byte) ComponentEnum.HEADER_COMPONENT.getValue(), in, headerComponent);
// we reset the count of byte read to zero
in.resetCount();
// magic reading
int magic = in.readInt();
logger.trace("magic: {}", magic);
headerComponent.setMagic(magic);
// minor_version reading;
byte minor = in.readByte();
logger.trace("minor: {}", minor);
headerComponent.setMinorVersion(minor);
// major_versionr reading
byte major = in.readByte();
logger.trace("major: {}", major);
headerComponent.setMajorVersion(major);
// flags reading
byte flags = in.readByte();
logger.trace("flags: {}", flags);
headerComponent.setFlags(flags);
// package Info reading
PackageInfo packageInfo = new PackageInfoRead().load(in);
headerComponent.setThePackage(packageInfo);
checkSize(in, headerComponent);
PackageNameInfo packageNameInfo = new PackageNameInfo();
headerComponent.setPackageName(new PackageNameInfo());
/*
packageNameInfo.load(in);
*/
return headerComponent;