scalaify inputstream read