ClojureDocs

导航

命名空间

output-stream

clojure.java.io

1.2 版开始提供
  • (output-stream x & opts)
Attempts to coerce its argument into an open java.io.OutputStream.
 Default implementations always return a java.io.BufferedOutputStream.
  Default implementations are defined for OutputStream, File, URI, URL,
 Socket, 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 OutputStream is
 properly closed.