Created
June 4, 2011 01:34
-
-
Save rahulkmr/1007447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (source output-stream) | |
(defn ^OutputStream output-stream | |
"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." | |
{:added "1.2"} | |
[x & opts] | |
(make-output-stream x (when opts (apply hash-map opts)))) | |
nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment