A New York City man who spent more than 25 years behind bars for rape and robbery has been set free.