1.2.0 permalink Arrow_down_16x16
  • (reader x)
Attempts to coerce its argument into an open java.io.Reader.
The default implementations of this protocol always return a
java.io.BufferedReader.

Default implementations are provided for Reader, BufferedReader,
InputStream, File, URI, URL, Socket, byte arrays, character arrays,
and String.

If 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. If this fails, a final attempt is made to resolve
the string as a resource on the CLASSPATH.

Uses *default-encoding* as the text encoding.

Should be used inside with-open to ensure the Reader 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 reader. Log in to add a comment.