Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn read-input-stream [is]
- (let [out (transient [])
- bufsize 8196
- buf (byte-array bufsize)]
- (loop []
- (let [n (.read is buf)]
- (if (pos? n)
- (do
- (println "Read" n " bytes")
- (for [i (range n)]
- (conj! out (aget buf i)))
- (recur))
- (persistent! out))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement