classpath
[Top][All Lists]
Advanced

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

Re: gnu.java.nio.FileChannelImpl


From: Michael Koch
Subject: Re: gnu.java.nio.FileChannelImpl
Date: Thu, 25 Nov 2004 21:31:51 +0100
User-agent: KMail/1.6.2

Am Donnerstag, 25. November 2004 20:03 schrieb Ewout Prangsma:
> Michael Koch wrote:
> >Am Donnerstag, 25. November 2004 18:13 schrieb Ewout Prangsma:
> >>Now the FileInputStream constructor does a "new
> >>FileChannelImpl(...)", instead i suggest to let is call
> >>"VMFileChannel.open(...)" that returns a FileChannel implemented
> >> by the VM. The default implementation would be to return a new
> >> FileChannelImpl, so that would mean no native changes.
> >
> >Yes, such stuff can be done as optimization. But we have to do
> > this carefully. We have to make sure this can be exploited by bad
> > code. I would guess the current code can be exploited. I need to
> > write some applets to test this.
>
> I think this approach would be safer, because the open method i
> mentioned can (and should) be package protected. The current
> FileChannelImpl is public, so everyone can access it.
> About the optimization, i consider it necessary when i want to use
> classpath out of the box, since i'm not supporting native methods.

package-privateness doesn't help much when the class is in a different 
package. We need to carefully check how to do this.


Michael 
-- 
Homepage: http://www.worldforge.org/




reply via email to

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