Hi

I solved the problem temporarily by creating a Java class IOConverter
that exposes the RubyIO#getOutStream and RubyIO#getInStream from the
IO-objects. This is not a perfect solution, but it works for now.

Regards
 Ola Bini


----- Original Message -----
From: Thomas E Enebo <[EMAIL PROTECTED]>
Date: Monday, March 20, 2006 8:18 pm
Subject: Re: [Jruby-devel] Use of RubyIO#getOutStream
To: [email protected]

> On Mon, 20 Mar 2006, Ola Bini defenestrated me:
> > Hi.
> > 
> > I'm trying to make it simple using OutputStreams with Ruby IO 
> objects,> like this:
> >  @io = GZIPOutputStream.new(io.getOutStream)
> > but for some reason this throws a method_missing when I give it a
> > RubyFile-object. Any one who could explain this for me? Or am I 
> missing> something obvious?
> 
>  Ruby IO class has no getOutStream method, whereas the Java class 
> RubyIOdoes.  I am not sure if we should expose the underlying impl 
> of IO to
> ruby-space or whether we should allow Ruby IO to be wrapped by Java 
> Streams.  
> The latter has the appeal of not leaking implementation so that 
> would be
> my first guess.
> 
>  I guess I need to think a little about how that could be 
> done...It will
> mean at least some Java code.
> 
> -Tom
> 
> -- 
> + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
> | Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
> |                              |  mind." -Louis Pasteur       |
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting 
> languagethat extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new coding 
> territory!http://sel.as-
>
us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642_______________________________________________
> Jruby-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jruby-devel
> 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to