source

abstract fun source(): BufferedSource

Open an BufferedSource to the resource.

Attempts to open a byte stream to the resource contents.

The method will block until a stream is opened or an exception is thrown.NOTE: It is the caller's responsibility to close the resulting object or resource leaks will occur.

Return

an BufferedSource to the contents of the resource. Cannot be null.

Throws

on a network, IO or API error.