did you try just passing in ARGF? its a stream object so might just work as it is?