Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created November 26, 2011 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomjack/f11bb40e7bd951dbd77a to your computer and use it in GitHub Desktop.
Save tomjack/f11bb40e7bd951dbd77a to your computer and use it in GitHub Desktop.
user> (use '[clojure.java.io :only (input-stream output-stream copy)])
nil
user> (with-open [in (input-stream "http://example.com/test.jpg")
out (output-stream "/tmp/test.jpg")]
(copy in out))
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment