Skip to content

Instantly share code, notes, and snippets.

@marktriggs
Created December 12, 2009 05:22
Show Gist options
  • Save marktriggs/254746 to your computer and use it in GitHub Desktop.
Save marktriggs/254746 to your computer and use it in GitHub Desktop.
(with-open [r (BufferedReader. (java.io.InputStreamReader.
(FileInputStream. "/home/mst/updates.xml")
"US-ASCII")
131072)]
(loop [#^String line (.readLine r)
remaining (- end-byte start-byte)]
(when (and (>= remaining 0) line)
(recur (.readLine r)
(- remaining (.length line))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment