I need to convert Nippy data structures stored on disk into something that can be read by Nippy? Nippy uses byte arrays, so I need some way to convert the file into a byte a
Here's how I do it generically with clojure built-ins
(defn slurp-bytes "Slurp the bytes from a slurpable thing" [x] (with-open [out (java.io.ByteArrayOutputStream.)] (clojure.java.io/copy (clojure.java.io/input-stream x) out) (.toByteArray out)))