How to convert inputStream into string

How to convert inputStream into string

Currently:

val str : String =

client.inputStream.read

().toString();

I get ASCII values one by one, I tried with readBytes but no luck. What’s the simplest solution to this?

submitted by /u/GCapablanca
[link] [comments]