Permalink
Browse files

dodge ns collisions with clojure.java.io

  • Loading branch information...
1 parent 1d66c09 commit 061f3d5b45657a89faa335ffa2bb80819f2e6918 @stuarthalloway stuarthalloway committed May 21, 2010
@@ -57,14 +57,15 @@
Note: this is not really \"duck typing\" as implemented in languages
like Ruby. A better name would have been \"do-what-I-mean-streams\"
or \"just-give-me-a-stream\", but ducks are funnier."}
- clojure.contrib.duck-streams
- (:import
- (java.io Reader InputStream InputStreamReader PushbackReader
- BufferedReader File PrintWriter OutputStream
- OutputStreamWriter BufferedWriter Writer
- FileInputStream FileOutputStream ByteArrayOutputStream
- StringReader ByteArrayInputStream)
- (java.net URI URL MalformedURLException Socket)))
+ clojure.contrib.duck-streams
+ (:refer-clojure :exclude (spit))
+ (:import
+ (java.io Reader InputStream InputStreamReader PushbackReader
+ BufferedReader File PrintWriter OutputStream
+ OutputStreamWriter BufferedWriter Writer
+ FileInputStream FileOutputStream ByteArrayOutputStream
+ StringReader ByteArrayInputStream)
+ (java.net URI URL MalformedURLException Socket)))
(def
@@ -54,16 +54,17 @@
BufferedInputStream and BufferedOutputStream instances (respectively),
with default implementations extended to a variety of argument
types: URLs or filenames as strings, java.io.File's, Sockets, etc."}
- clojure.contrib.io
- (:import
- (java.io Reader InputStream InputStreamReader PushbackReader
- BufferedReader File OutputStream
- OutputStreamWriter BufferedWriter Writer
- FileInputStream FileOutputStream ByteArrayOutputStream
- StringReader ByteArrayInputStream
- BufferedInputStream BufferedOutputStream
- CharArrayReader)
- (java.net URI URL MalformedURLException Socket)))
+ clojure.contrib.io
+ (:refer-clojure :exclude (spit))
+ (:import
+ (java.io Reader InputStream InputStreamReader PushbackReader
+ BufferedReader File OutputStream
+ OutputStreamWriter BufferedWriter Writer
+ FileInputStream FileOutputStream ByteArrayOutputStream
+ StringReader ByteArrayInputStream
+ BufferedInputStream BufferedOutputStream
+ CharArrayReader)
+ (java.net URI URL MalformedURLException Socket)))
(def
@@ -548,4 +549,4 @@ Raise an exception if any deletion fails unless silently is true."
(defmethod as-url String [#^String x] (URL. x))
-(defmethod as-url File [#^File x] (.toURL x))
+(defmethod as-url File [#^File x] (.toURL x))
@@ -1,4 +1,5 @@
(ns clojure.contrib.test-io
+ (:refer-clojure :exclude (spit))
(:use clojure.test clojure.contrib.io)
(:import (java.io File FileInputStream BufferedInputStream)
(java.net URL URI)))
@@ -92,4 +93,4 @@
(is (= content (slurp* (.getBytes content "UTF-8"))))
(is (= content (slurp* (.toCharArray content))))
(finally
- (.delete f)))))
+ (.delete f)))))
@@ -1,4 +1,5 @@
(ns clojure.contrib.test-properties
+ (:refer-clojure :exclude (spit))
(:use clojure.test clojure.contrib.properties
[clojure.contrib.io :only (spit)])
(:import (java.util Properties)

0 comments on commit 061f3d5

Please sign in to comment.