I haven't checked back on my previous programs (I will if this doesn't work), but I seem to remember doing this:
InputStream is =...