Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On Fri, May 08, 2015 at 01:01:40PM +0200, Lionel Elie Mamane wrote:
On Fri, May 08, 2015 at 10:23:37AM +0200, Stephan Bergmann wrote:

One is in connectivity (Lionel, do you happen to know how to trigger that
code?):

I uploaded a trigger case to
http://people.freedesktop.org/~lmamane/trigger-java_io_Reader::available.odb

Enable macros and run the macro "Main" in "Module1" in that file.

I tried it, and it doesn't work. In my tests, HSQLDB's
Clob.getCharacterStream().ready() returns true even at end-of-file.

So we might return "1" although we should return "0". Since the
documentation says: "Note: This method offers no information on
whether the EOF has been reached.", I suggest to just let it slide and
be like that: we return 1 even at EOF.

This whole class is a mess. It confuses the notion of byte and the
notion of character. In Java, and also in LibreOffice, a character is
*two* bytes.

I'm hesitating between:

1) "Unimplementing" getCharacterStream in the SDBC<->JDBC driver

2) Having it just call getBinaryStream (which uses java_io_InputStream)

3) Fixing java_io_Reader to properly handle the bytes <-> character
   conversion, (which is annoying because it will have to do its own
   buffering for when an odd number of bytes is read...).

I took option 3. Pushing soon.

-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.