Ruchika's case: Is media trial the only way to get justice?

It is the duty of the media to take up shocking cases of miscarriage of justice -- but what happens if public opinion gets it wrong?