Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn read-input-stream [is]
- (let [bufsize 8196
- buf (byte-array bufsize)]
- (loop [out ""]
- (let [n (.read is buf)]
- (if (pos? n)
- (do
- (println "Read" n " bytes")
- (recur (string/join out (apply str (take n (seq buf))))))
- out)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement