Created
December 26, 2020 17:12
-
-
Save tvaisanen/51720c699057e6ab5c0ee26a2ff9e3fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn stream-bytes | |
| "Input stream to bytes. i.e. (-> file io/input-stream stream-bytes)" | |
| [is] | |
| (let [baos (java.io.ByteArrayOutputStream.)] | |
| (io/copy is baos) | |
| (.toByteArray baos))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment