   (:require [clojure.tools.reader.edn :as edn]
             [clojure.tools.reader     :as r]
             [immutant.internal.util   :as u])
-  (:import [org.projectodd.wunderboss.codecs BytesCodec Codecs None StringCodec]))
+  (:import [org.projectodd.wunderboss.codecs BytesCodec Codec Codecs None StringCodec]
+           java.nio.ByteBuffer))
 
 (defmacro data-readers []
   (if (resolve 'clojure.core/*data-readers*)

  []
  (into #{} (map #(-> % .name keyword) (.codecs codecs))))

(defn lookup-codec
  [name-or-content-type]
  (if-let [codec (.forName codecs (name name-or-content-type))]
    codec

     (decode [data#]
       (~decode data#))))

(defonce ^:private ^Codecs codecs
  (-> (Codecs.)
    (.add None/INSTANCE)))

