Absorption spectra of type I and type II strained-layer superlattices