        (-> x (.resolve (str (.getPath x) "/")) (.resolve (str y)))))
   ([x y & more] (apply uri (uri x y) more)))
 
-(defmethod print-method URI
-  ([^URI x ^java.io.Writer w]
-     (.write w "#java.net/uri \"")
-     (.write w (str x))
-     (.write w "\"")))
+(defmethod print-method URI [x w] (write-all w "#java.net/uri \"" x "\""))
+(defmethod print-dup URI [x w] (write-all w "#java.net/uri \"" x "\""))
 
 (defn uri?
   "True iff `x` is a URI."

    -path [x] "Coerce argument to a Path; private implementation.")
  (^java.net.URI
    -uri [x] "Coerce argument to a URI; private implementation."))

(defn path
  "Coerce argument(s) to a Path, resolving successive arguments against base."

  ([x y] (Path. (-path x) (str y)))
  ([x y & more] (apply path (path x y) more)))

(defmethod print-method Path [x w] (write-all w "#hadoop.fs/path \"" x "\""))
(defmethod print-dup Path [x w] (write-all w "#hadoop.fs/path \"" x "\""))

(defn path?
  "True iff `x` is a Path."
