[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New IO Native Provider Interface

From: Tom Tromey
Subject: Re: New IO Native Provider Interface
Date: 06 Mar 2003 10:53:09 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Jeroen" == Jeroen Frijters <address@hidden> writes:

Jeroen> - FileOutputStream should not request read access, so the modes should
Jeroen> be "w" and "a"

I have a slight preference to use ints for the flags, not Strings.

Jeroen> - write(byte[] buf, long offset, long length) should not use longs for
Jeroen> offset and length
Jeroen> - nativeReadByte shouldn't return a long

Agreed.  In general the argument and return types should match what
the higher-level API is capable of.  So for instance the byte argument
to nativeWriteByte should just be an `int', as that is what is used in
the other layers.  Then we don't need casts anywhere.

I don't understand why there is a nativeValid method and checks for
nativeFd==-1.  Shouldn't these be the same?  If not, when will they be
different?  I think I see `nativeValid' as testing `is this
FileDescriptor valid?'.

In close(), if nativeClose throws an exception, won't the
FileDescriptor be left in an inconsistent state?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]