commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r782551 - in /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime: Descriptor.java Descriptor32.java Descriptor64.java
Date Mon, 08 Jun 2009 07:45:51 GMT
Author: mturk
Date: Mon Jun  8 07:45:51 2009
New Revision: 782551

URL: http://svn.apache.org/viewvc?rev=782551&view=rev
Log:
Add fd method for Descriptor.

Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor32.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor64.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor.java?rev=782551&r1=782550&r2=782551&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor.java
Mon Jun  8 07:45:51 2009
@@ -166,6 +166,12 @@
     public abstract boolean isClosed();
 
     /**
+     * Get underlying Operating system descriptor.
+     * @return operating system descriptor.
+     */
+    public abstract int fd();
+
+    /**
      * Compares this {@code Descriptor} to the specified object.
      *
      * @param other a {@code Descriptor}

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor32.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor32.java?rev=782551&r1=782550&r2=782551&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor32.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor32.java
Mon Jun  8 07:45:51 2009
@@ -33,14 +33,19 @@
      * Descriptor can be only created from native code.
      * Suppress any instantiation except form JNI.
      */
-    protected Descriptor32(int e, int i, int l, int h)
+    protected Descriptor32(int v, int i, int l, int h)
     {
-        super(e);
+        super(v);
         IHANDLE = i;
         PHANDLE = l;
         HANDLER = h;
     }
 
+    public int fd()
+    {
+        return IHANDLE;    
+    }
+
     public boolean isClosed()
     {
         // true if both int is negative and pointer is NULL

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor64.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor64.java?rev=782551&r1=782550&r2=782551&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor64.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Descriptor64.java
Mon Jun  8 07:45:51 2009
@@ -33,14 +33,19 @@
      * Descriptor can be only created from native code.
      * Suppress any instantiation except form JNI.
      */
-    private Descriptor64(int e, int i, long l, long h)
+    private Descriptor64(int v, int i, long l, long h)
     {
-        super(e);
+        super(v);
         IHANDLE = i;
         PHANDLE = l;
         HANDLER = h;
     }
 
+    public int fd()
+    {
+        return IHANDLE;    
+    }
+
     public boolean isClosed()
     {
         // true if both int is negative and pointer is NULL



Mime
View raw message