Attached flow structure and streamwise energy spectra in a turbulent boundary layer