I need to read bytes from this Blob. I'm trying the following but I'm getting this exception: oracle.sql.BLOB cannot be cast to [B
(defn select-test2[]
(clojure.contrib.sql/with-connection db
(with-query-results res ["SELECT my_blob from some_table"] (doall res))))
(defn obj [byte-buffer]
(if-not (nil? byte-buffer)
(with-open [object-in (ObjectInputStream.
(ByteArrayInputStream. byte-buffer))]
(.readObject object-in))))
(obj (:my_blob (first (select-test2))))