Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
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.
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.
Converted from http://www.assembla.com/spaces/clojure/tickets/62
Attachments:
0001-c.c.io-provides-input-stream-and-output-stream-for-b.patch - https://www.assembla.com/spaces/clojure/documents/d_99D0cRWr34N6eJe5afGb/download/d_99D0cRWr34N6eJe5afGb
0001-c.c.io-provides-input-stream-and-output-stream-for-b.patch - https://www.assembla.com/spaces/clojure/documents/b8NlJSrXKr346PeJe5afGb/download/b8NlJSrXKr346PeJe5afGb