       (doseq [chunk body]
         (.write writer (str chunk)))))
   java.io.InputStream
-  (write-body-to-stream [body _ output-stream]
+  (write-body-to-stream [body _ ^OutputStream output-stream]
     (with-open [out output-stream, body body]
       (io/copy body out)))
   java.io.File
-  (write-body-to-stream [body _ output-stream]
+  (write-body-to-stream [body _ ^OutputStream output-stream]
     (with-open [out output-stream]
       (io/copy body out)))
   nil

(ns ring.core.protocols
  "Protocols necessary for Ring."
  {:added "1.6"}
  (:require [clojure.java.io :as io]
            [ring.util.response :as response]))


    "Write a value representing a response body to an output stream. The stream
    will be closed after the value had been written."))

(defn- ^Writer response-writer [response output-stream]
  (if-let [charset (response/get-charset response)]
    (io/writer output-stream :encoding charset)
    (io/writer output-stream)))
