protected void checkSize(CapInputStream stream, Component component) throws UnableToReadCapFileException {
// we check that the number of byte Read is the same that size
if (stream.getByteRead() != component.getSize()) {
logger.error("element size ({}) different from size read ({})", component.getSize(), stream.getByteRead());
throw new UnableToReadCapFileException("element size different from size read");
}
}