Two men have been remanded into custody accused of what a judge described as essentially amounting to torture.