[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New IO Native Provider Interface
From: |
Brian Jones |
Subject: |
Re: New IO Native Provider Interface |
Date: |
06 Mar 2003 08:04:31 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
"Jeroen Frijters" <address@hidden> writes:
> > > - write(byte[] buf, long offset, long length) should not
> > use longs for
> > > offset and length
> >
> > I take it that you are referring to the Java write() method I
> > added to the
> > FileDescriptor class and not the nativeWriteBuf() method. I'm ok with
> > modifying this.
>
> Yes.
>
> >I do typically want to use longs for native calls.
>
> Why? Is it expensive to use ints on 64 bit architectures?
>
> > > - nativeReadByte shouldn't return a long
> >
> > Why not? All of the rest of the native methods that return values
> > return longs.
>
> I missed the others. IMHO only file offsets and native pointers should
> be long, all others should be the most natural type. In this case I
> think that's int.
I couldn't find an example where 'read' methods ever returned
something other than int. I think that offsets could be 'long' on
some file systems but the public API is limited on a number of classes
in this respect.
--
Brian Jones <address@hidden>