-
-
Save anonymous/ef919ea2b636d40b5efc to your computer and use it in GitHub Desktop.
This file contains 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 recur-not-tail | |
[din loop] | |
(let [stream-buf (byte-array 0xFFF) | |
baos (java.io.ByteArrayOutputStream.)] | |
(loop [] | |
(let [read-bytes (.read din stream-buf 0 0xFFF)] | |
(if (= -1 read-bytes) | |
nil | |
(do (.write baos 0 read-bytes) | |
(recur))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment