|
|
|
Had any more thoughts on this, Bill? It could be something loaded as an extension, providing direct IO stream read/write to JRuby users.
Just chiming in to support the concept. I may have more concrete feedback after I implement some stream stuff this week.
I guess this was never implemented? This is exactly what I need right now. I'm trying to stream an image using send_data, and my image is on a Java ByteArrayOutputStream. I should get a byte array when calling toByteArray on it, which should be compatible with Ruby String, right? In any case, the following code doesn't work. What is the workaround that the other user you mentioned did to get this to work?
def scaleImage if isWritten Jennifer Ball: There is String.from_java_bytes to allow you to turn a byte[] into a Ruby string...that may be the workaround you're looking for, yes?
|
||||||||||||||||||||||||||||||||||||||||||
Better to work on in the short term would be making it easy and performant to wrap a Java stream with a Ruby IO object. That's in greater need than a way to dump strings directly right now.