   (make-output-stream [path opts]
     (let [^OutputStream os (path->output-stream path)]
       (io/make-output-stream os opts))))
-
-(extend-type ratpack.http.TypedData
-  io/IOFactory
-  (make-reader [td opts]
-    (let [^InputStream is (.getInputStream td)]
-      (io/make-reader is opts)))
-  (make-writer [path opts]
-    (throw (UnsupportedOperationException. "read only object")))
-  (make-input-stream [td opts]
-    (let [^InputStream is (.getInputStream td)]
-      (io/make-input-stream is opts)))
-  (make-output-stream [path opts]
-    (throw (UnsupportedOperationException. "read only object"))))
-

(ns datoteka.impl
  "Implementation details and helpers."
  (:require [datoteka.proto :as pt]
            [datoteka.fs :as fs]
            [buddy.core.codecs :as codecs]
            [clojure.java.io :as io])
  (:import java.io.File
           java.io.ByteArrayInputStream

(extend-protocol pt/IContent
  String
  (-input-stream [v]
    (let [data (.getBytes v "UTF-8")]
      (ByteArrayInputStream. ^bytes data)))

  Object
  (-input-stream [v]
    (io/input-stream v)))

(extend-protocol pt/IUri
  URI
