Single-Detector Spectrometer Using a Superconducting Nanowire.