我需要從此Blob中讀取字節。我想下面的,但我發現此異常: oracle.sql.BLOB不能轉換爲[BClojure從數據庫讀取Blob
(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))))
Zmila,我想知道一個BLOB,而不是一個CLOB。 – aQ123 2010-09-03 16:21:47