fun InputStream.readAllOrException(b: ByteArray): Int
Read bytes from the input stream into the array. If there are not enough bytes to fill the array, an exception is thrown.
IOException - if reading from the InputStream fails (see InputStream.read) or if the number of bytes that
can be read is lower than the length of the parameter b.