duck-streams should handle bytes as well as characters
I'd like to see duck-streams learn to support byte-oriented I/O just as well as it currently supports character-oriented I/O.
I've written an implementation and made it available on my ducks-byte [1] branch of clojure-contrib for discussion and possible inclusion.
[1] http://github.com/bpsm/clojure-contrib/tree/ducks-byte
The branch itself breaks the change down into a sequence of (hopefully) logical steps, so I encourage those interested to have a look at it.
I've renamed
I've written an implementation and made it available on my ducks-byte [1] branch of clojure-contrib for discussion and possible inclusion.
[1] http://github.com/bpsm/clojure-contrib/tree/ducks-byte
The branch itself breaks the change down into a sequence of (hopefully) logical steps, so I encourage those interested to have a look at it.
Features
- input-stream is like reader, except for bytes.
- output-stream is like writer, except for bytes.
- reader and writer now build on input-stream and output-stream where appropriate.
Compatibility
I've renamed
*append-to-writer*
because it applies not just to writers, but also to output-streams. This might be a compatibility issue for clients that did not heed the advice given in documentation to use append-writer or append-spit instead of directly binding this var.
Leave a comment
file:d_99D0cRWr34N6eJe5afGb: compatible with mavenized master (e.g. 18c6d2102a)
on 2010-04-13 05:17 *
By stuart.halloway
Assigned to set to stuart.halloway
Milestone changed from Backlog to Release 1.2
on 2010-04-13 09:27 *
By bpsm
Attachment 0001-c.c.io-provides-input-stream-and-output-stream-for-b.patch added
file:b8NlJSrXKr346PeJe5afGb: rebased for clojure.contrib.io