input-stream

clojure.contrib.io

  • (input-stream x)
Attempts to coerce its argument into an open java.io.InputStream.
The default implementations of this protocol always return a
java.io.BufferedInputStream.

Default implementations are defined for OutputStream, File, URI, URL,
Socket, byte array, and String arguments.

If the argument is a String, it tries to resolve it first as a URI, then
as a local file name. URIs with a 'file' protocol are converted to
local file names.

Should be used inside with-open to ensure the InputStream is properly
closed.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

No comments for input-stream. Log in to add a comment.