openInputChannel
Opens this Url for reading, e.g. to back open(Url, read, Stream) (see it.unibo.tuprolog.solve.libs.io.primitives.Open3) or it.unibo.tuprolog.solve.libs.io.primitives.Consult.
On the JVM this works for any Url whose Url.protocol java.net.URL can open a stream for (files, http(s), ...); on JS it eagerly Url.readAsTexts the resource into an in-memory InputChannel.
Throws
if the resource cannot be opened for reading.
Under Node, streams a local file lazily off disk. Everywhere else (browser-local or any remote resource), eagerly reads the whole resource via Url.readAsText into an in-memory InputChannel instead, since Okio has no synchronous file system for browsers and this module has no HTTP streaming client (see fetch).
Streams a local file lazily off disk via LocalFileSystem; for any non-Url.isFile URL (http(s), ...), lazily streams from java.net.URL.openStream, unlike the JS implementation which eagerly buffers remote resources in full.