Migrating from duck-streams/to-byte-array in Clojure 1.3

Just spent some time migrating my minecraft NBT library from to Clojure 1.2.1 to 1.3, had to make a few changes as many clojure.contrib 1.2.0 libraries were moved to separate modules or merged into core. The reliance on clojure.contrib.duck-streams was a tricky one to get around. Most of its functionality was moved to clojure.java.io, but not to-byte-array which was previously used to slurp in the binary .mca files. No much documentation around, but with a few hints from Stack Overflow I ended up with the following:

Seems to work so far, passing the current regression tests.

This entry was posted in Programming, Software and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *