readAsByteArray

abstract fun readAsByteArray(): ByteArray

Eagerly fetches the resource this Url points to, as raw bytes.

Throws

if the resource cannot be read (e.g. missing file, unreachable host).