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
With Scala IO, this should work:
def inputStreamToByteArray(is: InputStream): Array[Byte] = Resource.fromInputStream(in).byteArray