With Scala, what is the best way to read from an InputStream to a bytearray?
I can see that you can convert an InputStream to char array
Source.fromInput
We can do it using google API ByteStreams
import com.google.common.io.ByteStreams
pass the stream to ByteStreams.toByteArray method for conversion
ByteStreams.toByteArray(stream)