kotlin-stdlib / kotlin.io / java.net.URL Extensions for java.net.URL JVM 1.0 readBytes Reads the entire content of the URL as byte array. fun URL.readBytes(): ByteArray JVM 1.0 readText Reads the entire content of this URL as a String using UTF-8 or the specified charset. fun URL.readText(charset: Charset = Charsets.UTF_8): String