code: private final int calcSize () {
  
          int size = BasicHeaderSegment.BHS_FIXED_SIZE;
          size += basicHeaderSegment.getTotalAHSLength() * AdditionalHeaderSegment.AHS_FACTOR;
  
          // plus the sizes of the used digests
          size += headerDigest.getSize();
          size += dataDigest.getSize();
  
          size += AbstractDataSegment.getTotalLength(basicHeaderSegment.getDataSegmentLength());
  
          return size;
      }
docs: Calculates the needed size (in bytes) of serializing this object.
  
  @return The needed size to store this object.