• (writer x)
Attempts to coerce its argument into an open java.io.PrintWriter
wrapped around a java.io.BufferedWriter. Argument may be an
instance of Writer, PrintWriter, BufferedWriter, OutputStream, File,
URI, URL, Socket, or 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.

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

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/duck_streams.clj:153 top

(defmulti ^{:tag PrintWriter
             :doc "Attempts to coerce its argument into an open java.io.PrintWriter
  wrapped around a java.io.BufferedWriter.  Argument may be an
  instance of Writer, PrintWriter, BufferedWriter, OutputStream, File,
  URI, URL, Socket, or 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.

  Should be used inside with-open to ensure the Writer is properly
  closed."
             :arglists '([x])}
  writer class)
Vars in clojure.contrib.duck-streams/writer: class defmulti
Used in 0 other vars

Comments top

No comments for writer. Log in to add a comment.