On Wed, Dec 14, 2011 at 12:04 AM, Simone Mosciatti <mweb....@gmail.com> wrote:
> Thank you so much, just one last thing, why you use a char-array ?

Reader returns chars.

> If I want use a byte-array, and no map all the whole sequence ?

Use an InputStream rather than a reader if you're reading binary files
(or text files as binary). If you're not consuming the whole sequence,
again, have the part of the code that consumes some and then stops
also create the stream and be responsible for closing it, passing it
to the lazy sequence maker; use with-open, and if that part of the
code still emits a sequence (e.g. (take some-number (remove icky?
(...)))), rather than a single object (extracted, reduced, or
whatever), wrap that sequence in (doall ...) inside the with-open so
all the needed stream I/O actually is performed before the stream gets
closed.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to