[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 kielmann at cs.vu.nl
Fri Jan 25 04:40:48 CST 2008


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???


Thilo

On Thu, Jan 24, 2008 at 06:34:44PM +0100, Ceriel Jacobs wrote:
> From: Ceriel Jacobs <ceriel at cs.vu.nl>
> To: Andre Merzky <andre at merzky.net>
> CC: Thilo Kielmann <kielmann at cs.vu.nl>, 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"
> 
> Hi Andre,
> 
> Andre Merzky wrote:
> 
> >Hi Ceriel,
> >
> >Quoting [Ceriel Jacobs] (Jan 24 2008):
> 
> >>As far as I am concerned, the "offset" field can completely be removed 
> >>from the specs.
> >>POSIX iovec does not have an offset field, and I don't know why it
> >>made it to the SAGA specs.
> >
> >To simplify the reuse of memory segments w/o the need for
> >pointer arythmetics:
> ...
> >If offsets are really needed can certainly be disputed.  In
> >C++, where pointer arithmetic is easy, one could certainly
> >do without.  I'd actually thought that it helps in Java.
> >Ah, well... ;-)
> 
> Well, java.io.InputStream has a read method that has an offset,
> so it is certainly common usage in Java to have an offset.
> But then, the offset should be in buffer, not in iovec.
> I think that that would make more sense than to have it
> in iovec. O well, I guess this is a done deal.
> 
> Ceriel



-- 
Thilo Kielmann                                 http://www.cs.vu.nl/~kielmann/


More information about the saga-rg mailing list