Clojure-Contrib

duck-streams should handle bytes as well as characters

Details

  • Type: Defect Defect
  • Status: Closed 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.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - 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
Hide
Assembla Importer added a comment -

bpsm said: [file:d_99D0cRWr34N6eJe5afGb]: compatible with mavenized master (e.g. 18c6d2102a)

Show
Assembla Importer added a comment - bpsm said: [file:d_99D0cRWr34N6eJe5afGb]: compatible with mavenized master (e.g. 18c6d2102a)
Hide
Assembla Importer added a comment -

bpsm said: Teaching duck-streams to try to resolve a string that isn't a file or URL as a classpath resource more properly belongs in a separate ticket.

Show
Assembla Importer added a comment - bpsm said: Teaching duck-streams to try to resolve a string that isn't a file or URL as a classpath resource more properly belongs in a separate ticket.
Hide
Assembla Importer added a comment -

stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)

Show
Assembla Importer added a comment - stuart.sierra said: Updating tickets (#1, #2, #3, #4, #6, #20, #23, #25, #30, #31, #33, #34, #35, #37, #38, #52, #55, #58, #59, #60, #61, #62, #63, #64)
Hide
Assembla Importer added a comment -

bpsm said: [file:b8NlJSrXKr346PeJe5afGb]: rebased for clojure.contrib.io

Show
Assembla Importer added a comment - bpsm said: [file:b8NlJSrXKr346PeJe5afGb]: rebased for clojure.contrib.io

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: