← Docs
kotlin-stdlib / kotlin.io / java.net.URL / readBytes

readBytes

JVM
1.0
fun URL . readBytes ( ) : ByteArray
(source)

Reads the entire content of the URL as byte array.

This method is not recommended on huge files.

Return a byte array with this URL entire content.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .