[SAGA-RG] Fwd (ceriel at cs.vu.nl): [saga-cvs] "SAGA-RG/SAGA-Bindings/Java/OGF/src/org/ogf/saga/file FileFactory.java"
Andre Merzky
andre at merzky.net
Fri Jan 25 04:54:28 CST 2008
Quoting [Ceriel Jacobs] (Jan 25 2008):
> From: Ceriel Jacobs <ceriel at cs.vu.nl>
> To: Thilo Kielmann <kielmann at cs.vu.nl>
> CC: Andre Merzky <andre at merzky.net>, SAGA RG <saga-rg at ogf.org>
> Subject: Re: [SAGA-RG] Fwd (ceriel at cs.vu.nl):
> [saga-cvs] "SAGA-RG/SAGA-Bindings/Java/OGF/src/org/ogf/saga/file
> FileFactory.java"
>
> Thilo Kielmann wrote:
>> Hi all,
>> I suggest to do the following:
>> - add the error conditions pointed out by Ceriel as throwing
>> "BadParameter"
>> in the errata doc.
>> - putting the offset from iovec to buffer can not be done in the current
>> SAGA
>> Core 1.0. We could only do that in a final recommendation, or else in a
>> SAGA
>> Core 2.0.
>> However, I am wondering if we could do this in the Java language
>> binding.
>> After all, this would be a pure extension to the language-independent
>> spec.
>> (You can still use the offset in the iovec, but in Java also in the
>> buffer.)
>> That would be along the lines of other bindings to the Java language,
>> like adding i/o streams next to random file i/o. If Java buffers have an
>> offset,
>> shouldn't then SAGA's language binding also have this? Wouldn't this
>> just
>> be the "natural" thing???
>
> I think the "natural" thing in Java would be to have an explicit
> "offset" parameter in the write() and read() method.
> That would make them look the most like the write and read from
> [In|Out]putStream.
>
> I could, of course, just add write and read versions with an offset
> to the methods that are already there, in the Java bindings.
> Having those would also allow for simple implementations of
> readv()/writev().
If the offset is on the methods, one needs to take care that
the user does not confuse file/stream offset and buffer
offset. If thats the custom syntax in Java that should not
be a problem I guess?
Andre.
--
No trees were destroyed in the sending of this message, however,
a significant number of electrons were terribly inconvenienced.
More information about the saga-rg
mailing list