This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: java.io.FileDescriptor enhancement [now with correct patch]
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Sun, 30 Mar 2003 19:20:12 +0100
- Subject: Re: java.io.FileDescriptor enhancement [now with correct patch]
- References: <200303302015.38877.konqueror@gmx.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Sonntag, 30. März 2003 20:15 schrieb Michael Koch:
> Hi list,
>
>
> java.io.FileDescriptor in classpath has the package-private method
> getNativeFd() which returns the file descriptor used by the native
> implementation.
>
> I would like to introduce such a method too for the libgcj version
> to make it easier to use FileDescriptor objects (mainly for
> java.nio).
>
> What do you think about this ?
>
>
> Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+hzVcWSOgCCdjSDsRAvPIAJ9yCkmBICRfNj9Ic0E9li5aV9cB8wCfTWYU
q3qKuIFa/lzFBvyGV/C0yAs=
=H81o
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1826
diff -u -r1.1826 ChangeLog
--- ChangeLog 30 Mar 2003 06:43:44 -0000 1.1826
+++ ChangeLog 30 Mar 2003 18:17:52 -0000
@@ -1,3 +1,8 @@
+2003-03-30 Michael Koch <konqueror at gmx dot de>
+
+ * java/io/FileDescriptor.java
+ (getNativeFd): New method.
+
2003-03-29 Eric Blake <ebb9 at email dot byu dot edu>
Tom Tromey <tromey at redhat dot com>
Index: java/io/FileDescriptor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/FileDescriptor.java,v
retrieving revision 1.12
diff -u -r1.12 FileDescriptor.java
--- java/io/FileDescriptor.java 28 Mar 2003 09:49:44 -0000 1.12
+++ java/io/FileDescriptor.java 30 Mar 2003 18:17:52 -0000
@@ -77,6 +77,11 @@
native int read (byte[] bytes, int offset, int len) throws IOException;
native int available () throws IOException;
+ // Don't do anything crazy with this
+ int getNativeFd ()
+ {
+ return fd;
+ }
// When collected, close.
protected void finalize () throws Throwable