On Thu, Jan 8, 2009 at 12:36 PM, Brian Doyle wrote:
>
>
> On Thu, Jan 8, 2009 at 11:34 AM, James Reeves
> wrote:
>
>>
>> On Jan 8, 5:05 pm, "Brian Doyle" wrote:
>> > I incorporated most of James ideas but I don't like the name
>> pipe-stream.
>>
>> Then wouldn't copy-stream be better? write-str
On Thu, Jan 8, 2009 at 11:34 AM, James Reeves wrote:
>
> On Jan 8, 5:05 pm, "Brian Doyle" wrote:
> > I incorporated most of James ideas but I don't like the name pipe-stream.
>
> Then wouldn't copy-stream be better? write-stream isn't specific
> enough, IMO.
>
Sure, write-stream works for me.
On Jan 8, 5:05 pm, "Brian Doyle" wrote:
> I incorporated most of James ideas but I don't like the name pipe-stream.
Then wouldn't copy-stream be better? write-stream isn't specific
enough, IMO.
Also, I don't think there's a huge amount of gain to be had from an
Integer type hint in this case, s
I incorporated most of James ideas but I don't like the name pipe-stream.
(defn write-stream
"Writes the data from the istream to the ostream."
([#^java.io.InputStream istream #^java.io.OutputStream ostream #^Integer
buffer-size]
(let [buffer (make-array (Byte/TYPE) buffer-size)]
On Thursday 08 January 2009 01:28, James Reeves wrote:
> On Jan 7, 7:14 pm, "Brian Doyle" wrote:
> > (defn write-bytes
> > "Writes the bytes from the in-stream to the given filename."
> > [#^java.io.InputStream in-stream #^String filename]
> > (with-open [out-stream (new FileOut
On Jan 7, 7:14 pm, "Brian Doyle" wrote:
> (defn write-bytes
> "Writes the bytes from the in-stream to the given filename."
> [#^java.io.InputStream in-stream #^String filename]
> (with-open [out-stream (new FileOutputStream filename)]
> (let [buffer (make-array (Byte/TYPE
Looks like spit is for printing just text.
On Wed, Jan 7, 2009 at 12:20 PM, Paul Barry wrote:
> clojure.contrib.duck_streams/spit?
>
>
> On Wed, Jan 7, 2009 at 2:14 PM, Brian Doyle wrote:
>
>> I couldn't find anything in core or contrib that wrote out
>> bytes to a file so I wrote something to
clojure.contrib.duck_streams/spit?
On Wed, Jan 7, 2009 at 2:14 PM, Brian Doyle wrote:
> I couldn't find anything in core or contrib that wrote out
> bytes to a file so I wrote something to do it. Is this
> functionality already implemented and I just couldn't find
> it? If there isn't anythi