Patch to implement transfer using read and write, avoiding transferTo.
Thanks for the report. Guess we should at least document the problem. I'm not sure yet whether creating a work-around is a good idea, as this will slow down the native Sail on other platforms that do support direct channel-to-channel copying.
Same fix, with check for bad arguments.
I'm reticent to argue for inclusion, as it's unquestionably a Sun bug. However, I've attached another version of the patch, to detect and flag (rather than fail) when the 'length' argument goes past the end of the file (looks like file length, rather than transfer length, is being passed in).
Is there any chance you could benchmark it? If there is a significant performance hit, I'll just have to maintain a local patch until Sun get around to fixing it; the native store is perfect for desktop app deployment.
If you don't include it, *please* consider improving the exception handling. At the moment, imports continue after fatal errors, leaving the store in an inconsistent state. This made it harder to identify the problem, and will also cause breakage with, for example, full disks.
A workaround has been implemented, which is activated by checking the values of the system variables "os.name", "os.version" and "java.version". If the values of these variables indicate that the platform is running jdk 1.4.x on Linux with kernel 2.6.x, Sesame will fall back to using more conventional means.