I have a handy function that I\'ve used in Java for converting an InputStream to a String. Here is a direct translation to Scala:
def inputStreamToString(