classpath-patches
[Top][All Lists]
Advanced

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

RE: [cp-patches] FYI: Opening RandomAccessFiles requires excessivepermis


From: Jeroen Frijters
Subject: RE: [cp-patches] FYI: Opening RandomAccessFiles requires excessivepermission
Date: Thu, 8 Dec 2005 12:39:35 +0100

Hi Gary,

Sorry for the late response, but a somewhat easier (and more efficient)
way to fix the problem would have been:

+    if ((fdmode & FileChannelImpl.WRITE) != 0)
+      out = new DataOutputStream (new FileOutputStream (fd));
+    else
+      out = new DataOutputStream (new FilterOutputStream() {
+              public void write(int b) throws IOException {
+                 throw new IOException("Bad file descriptor");
+              }
+            });

Regards,
Jeroen

> -----Original Message-----
> From: address@hidden 
> [mailto:address@hidden 
> On Behalf Of Gary Benson
> Sent: Wednesday, December 07, 2005 16:32
> To: address@hidden
> Subject: [cp-patches] FYI: Opening RandomAccessFiles requires 
> excessivepermission
> 
> Hi all,
> 
> As promised, I committed my fix that means you don't need permission
> to write file descriptors to open a java.io.RandomAccessFile in read-
> only mode under a security manager.
> 
> Cheers,
> Gary
> 




reply via email to

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