         (.reset stream)
         stream))))
 
-(defmulti little-stream
-  "Converts argument into a DataInputStream, with little endian byte
-    order. Argument may be an Input Stream, File, String, byte array,
-    or another LittleEndianDataInputStream. If the latter is true,
-    acts as identity."
-  type)
-
-(derive java.lang.String ::fileable)
-(derive java.io.File ::fileable)
-
-(defmethod little-stream LittleEndianDataInputStream [x] x)
-
-(defmethod little-stream InputStream [x]
-  (LittleEndianDataInputStream. x))
-
-(defmethod little-stream ::fileable [x]
-  (little-stream (input-stream (io/file x))))
-
-(defmethod little-stream io/*byte-array-type* [b]
-  (little-stream (input-stream b)))
+(defn little-stream
+  "Returns a little endian DataInputStream opened up on the supplied
+  argument. See clojure.contrib.io/input-stream for acceptable
+  argument types."
+  [x]
+  (LittleEndianDataInputStream. (input-stream x)))
 
 ;; ## Data Extraction
 

  (let [bytes (get-bytes stream)]
    (rain-tuples (input-stream bytes))))

(defn sqr
  "Returns the square of x."
  [x] (* x x))

(defmapcatop [rain-chunks [chunk-size]]
  ^{:doc "Takes in data for a single month of rain data, and converts
  it into chunks for use in FORMA."}

  (:use cascalog.api
        (forma sinu
               [hadoop :only (get-bytes)]))
  (:require (clojure.contrib [io :as io]))
  (:import [java.io File InputStream]
           [java.util.zip GZIPInputStream]
           [forma LittleEndianDataInputStream]))
