openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <arie...@apache.org>
Subject Re: OpenCommandArgument2 Data Sink
Date Thu, 20 Jun 2013 08:56:48 GMT
On Thu, Jun 20, 2013 at 01:56:09PM +0530, Rajath Shashidhara wrote:
> Can I use this?
> http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/IOUtils.html

I doubt this knows how to handle css.io.XInputStream and
css.io.XOutputStream. Copying from an XInputInstream to an XOutputStream
is rather straight-forward: use a buffer to read bytes from the
XInputStream, write the buffer onto the XOutputstream, close the streams
when finished.
http://www.openoffice.org/api/docs/common/ref/com/sun/star/io/XOutputStream.html
http://www.openoffice.org/api/docs/common/ref/com/sun/star/io/XInputStream.html

Note that your implementation of CMISInputStream.readBytes() is assuming
that the buffer is not null and has enough space; and the code that
calls this may request to read more bytes than available. In all these
cases, your implementation of readBytes() will fail, but it shouldn't.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Mime
View raw message