ClojureDocs

Nav

Namespaces

Clojure/Conj 2026 — Charlotte, NC — Sept 30 - Oct 2 Learn More & Get Tickets →

PrintWriter-on

clojure.core

Available since 1.10 (source) Clojure/JVMClojureScriptbabashka
  • (PrintWriter-on flush-fn close-fn)
  • (PrintWriter-on flush-fn close-fn autoflush?)
implements java.io.PrintWriter given flush-fn, which will be called
when .flush() is called, with a string built up since the last call to .flush().
if not nil, close-fn will be called with no arguments when .close is called.
autoflush? determines if the PrintWriter will autoflush, false by default.