commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r881741 - in /commons/sandbox/runtime/trunk/src: main/java/org/apache/commons/runtime/io/ main/native/os/unix/ main/native/os/win32/ test/org/apache/commons/runtime/
Date Wed, 18 Nov 2009 12:10:10 GMT
Author: mturk
Date: Wed Nov 18 12:10:10 2009
New Revision: 881741

URL: http://svn.apache.org/viewvc?rev=881741&view=rev
Log:
Rename FileWrapper to FileSystemIo. Internal class so no API change

Added:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java
      - copied, changed from r881730, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileWrapper.java
Removed:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileWrapper.java
Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileLockImpl.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileStream.java
    commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/fsysio.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/finfo.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/File.java Wed Nov 18 12:10:10 2009
@@ -99,9 +99,9 @@
          * Note that those descriptors can be NULL in
          * case the FileStream.open call fails.
          */
-        STDIN  = new FileStreamImpl(FileWrapper.open(0, null));
-        STDOUT = new FileStreamImpl(FileWrapper.open(1, null));
-        STDERR = new FileStreamImpl(FileWrapper.open(2, null));
+        STDIN  = new FileStreamImpl(FileSystemIo.open(0, null));
+        STDOUT = new FileStreamImpl(FileSystemIo.open(1, null));
+        STDERR = new FileStreamImpl(FileSystemIo.open(2, null));
     }
 
 
@@ -149,7 +149,7 @@
         if (fd == null) {
             throw new NullPointerException();
         }
-        return FileWrapper.ftype(fd);
+        return FileSystemIo.ftype(fd);
     }
 
 
@@ -216,7 +216,7 @@
             throw new NullPointerException();
         }
         mode.add(FileOpenMode.CREATE);
-        Descriptor fd = FileWrapper.open(path, mode);
+        Descriptor fd = FileSystemIo.open(path, mode);
         if (fd == null) {
             // File exists and EXCL mode was given
             throw new FileNotFoundException(Local.sm.get("file.EEXIST"));
@@ -231,7 +231,7 @@
         if (path == null || mode == null) {
             throw new NullPointerException();
         }
-        Descriptor fd = FileWrapper.open(path, mode);
+        Descriptor fd = FileSystemIo.open(path, mode);
         if (fd == null) {
             // File exists and EXCL mode was given
             throw new FileNotFoundException(Local.sm.get("file.EEXIST"));
@@ -255,7 +255,7 @@
         if (path == null || mode == null || prot == null) {
             throw new NullPointerException();
         }
-        Descriptor fd = FileWrapper.open(path, mode, prot);
+        Descriptor fd = FileSystemIo.open(path, mode, prot);
         if (fd == null) {
             // File exists and EXCL mode was given
             throw new FileNotFoundException(Local.sm.get("file.EEXIST"));
@@ -503,7 +503,7 @@
         if (prefix == null) {
             throw new NullPointerException();
         }
-        Descriptor fd = FileWrapper.mktemp(directory, prefix, suffix, preserve);
+        Descriptor fd = FileSystemIo.mktemp(directory, prefix, suffix, preserve);
         return new FileStreamImpl(fd);
     }
 
@@ -521,7 +521,7 @@
         if (prefix == null) {
             throw new NullPointerException();
         }
-        Descriptor fd = FileWrapper.mktemp(prefix, suffix, preserve);
+        Descriptor fd = FileSystemIo.mktemp(prefix, suffix, preserve);
         return new FileStreamImpl(fd);
     }
 
@@ -539,7 +539,7 @@
         if (prefix == null) {
             throw new NullPointerException();
         }
-        return FileWrapper.mktemp(directory, prefix, suffix, preserve);
+        return FileSystemIo.mktemp(directory, prefix, suffix, preserve);
     }
 
     /**
@@ -556,7 +556,7 @@
         if (prefix == null) {
             throw new NullPointerException();
         }
-        return FileWrapper.mktemp(prefix, suffix, preserve);
+        return FileSystemIo.mktemp(prefix, suffix, preserve);
     }
 
     /**
@@ -646,7 +646,7 @@
         if (fd == null) {
             throw new NullPointerException();
         }
-        return FileWrapper.name(fd);
+        return FileSystemIo.name(fd);
     }
 
     public static int delete(Path path)

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileLockImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileLockImpl.java?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileLockImpl.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileLockImpl.java Wed Nov 18 12:10:10 2009
@@ -150,9 +150,9 @@
             return;
         }
         if (length < 0)
-            FileWrapper.unlock(fd);
+            FileSystemIo.unlock(fd);
         else
-            FileWrapper.unlock(fd, offset, length);
+            FileSystemIo.unlock(fd, offset, length);
         /* Detach from this locks container
          */
         container.detach(this);

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileStream.java?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileStream.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileStream.java Wed Nov 18 12:10:10 2009
@@ -148,7 +148,7 @@
     public void clearerr()
         throws IOException
     {
-        FileWrapper.clearerr(fd);
+        FileSystemIo.clearerr(fd);
         fd.clearerr();
     }
 
@@ -165,7 +165,7 @@
     public boolean eof()
         throws IOException
     {
-        return FileWrapper.eof(fd);
+        return FileSystemIo.eof(fd);
     }
 
     /**
@@ -182,7 +182,7 @@
     public boolean isBlocking()
         throws IOException
     {
-        return FileWrapper.blocking(fd);
+        return FileSystemIo.blocking(fd);
     }
 
     /**
@@ -201,7 +201,7 @@
     public boolean setTimeout(int timeout)
         throws IOException
     {
-        return FileWrapper.tmset(fd, timeout);
+        return FileSystemIo.tmset(fd, timeout);
     }
 
     /**
@@ -217,7 +217,7 @@
     public int getTimeout()
         throws IOException
     {
-        return FileWrapper.tmget(fd);
+        return FileSystemIo.tmget(fd);
     }
 
     /**
@@ -234,7 +234,7 @@
     public FileType getFileType()
         throws IOException
     {
-        return FileWrapper.ftype(fd);
+        return FileSystemIo.ftype(fd);
     }
 
     /**
@@ -257,7 +257,7 @@
     public String getPath()
         throws IOException
     {
-        return FileWrapper.name(fd);
+        return FileSystemIo.name(fd);
     }
 
     private boolean regionOverlaps(long offset, long length)
@@ -310,7 +310,7 @@
             throw new OverlappingFileLockException();
         }
 
-        FileWrapper.lock(fd, type);
+        FileSystemIo.lock(fd, type);
         /* Create FileLock wrapper object
          */
         FileLockImpl lock = new FileLockImpl(this, fd, type);
@@ -373,7 +373,7 @@
              */
             throw new OverlappingFileLockException();
         }
-        FileWrapper.lock(fd, type, offset, length);
+        FileSystemIo.lock(fd, type, offset, length);
         /* Create FileLock wrapper object
          */
         FileLockImpl lock = new FileLockImpl(this, fd, type, offset, length);
@@ -418,7 +418,7 @@
             throw new IllegalArgumentException();
         }
         synchronized (sync) {
-            FileWrapper.seek(fd, SeekMethod.SET.valueOf(), pos);
+            FileSystemIo.seek(fd, SeekMethod.SET.valueOf(), pos);
         }
     }
 
@@ -451,7 +451,7 @@
             throw new IllegalArgumentException();
         }
         synchronized (sync) {
-            return FileWrapper.seek(fd, moveMethod.valueOf(), off);
+            return FileSystemIo.seek(fd, moveMethod.valueOf(), off);
         }
     }
 
@@ -479,11 +479,11 @@
     {
         if (count > 0) {
             synchronized (sync) {
-                long cur = FileWrapper.seek(fd, SeekMethod.CUR.valueOf(), 0L);
-                long eof = FileWrapper.seek(fd, SeekMethod.END.valueOf(), 0L);
+                long cur = FileSystemIo.seek(fd, SeekMethod.CUR.valueOf(), 0L);
+                long eof = FileSystemIo.seek(fd, SeekMethod.END.valueOf(), 0L);
 
                 int cnt = (int)((cur + count > eof) ? eof - cur : count);
-                FileWrapper.seek(fd, SeekMethod.SET.valueOf(), cnt);
+                FileSystemIo.seek(fd, SeekMethod.SET.valueOf(), cnt);
                 return cnt;
             }
         }
@@ -507,7 +507,7 @@
     public long getFilePointer()
         throws IOException
     {
-        return FileWrapper.seek(fd, SeekMethod.CUR.valueOf(), 0L);
+        return FileSystemIo.seek(fd, SeekMethod.CUR.valueOf(), 0L);
     }
 
     /**
@@ -527,10 +527,10 @@
         throws IOException
     {
         synchronized (sync) {
-            long cur = FileWrapper.seek(fd, SeekMethod.CUR.valueOf(), 0L);
-            long end = FileWrapper.seek(fd, SeekMethod.END.valueOf(), 0L);
+            long cur = FileSystemIo.seek(fd, SeekMethod.CUR.valueOf(), 0L);
+            long end = FileSystemIo.seek(fd, SeekMethod.END.valueOf(), 0L);
 
-            FileWrapper.seek(fd, SeekMethod.SET.valueOf(), cur);
+            FileSystemIo.seek(fd, SeekMethod.SET.valueOf(), cur);
             return end;
         }
     }
@@ -561,7 +561,7 @@
             throw new IllegalArgumentException();
         }
         synchronized (sync) {
-            FileWrapper.trunc(fd, newLength);
+            FileSystemIo.trunc(fd, newLength);
         }
     }
 
@@ -580,7 +580,7 @@
         throws IOException, SecurityException
     {
         synchronized (sync) {
-            return FileWrapper.stat(fd);
+            return FileSystemIo.stat(fd);
         }
     }
 
@@ -605,7 +605,7 @@
     public int read()
         throws IOException
     {
-        return FileWrapper.read(fd);
+        return FileSystemIo.read(fd);
     }
 
     /**
@@ -635,7 +635,7 @@
         if (buffer.length == 0) {
             return 0;
         }
-        return FileWrapper.read(fd, buffer, 0, buffer.length);
+        return FileSystemIo.read(fd, buffer, 0, buffer.length);
     }
 
     /**
@@ -678,7 +678,7 @@
              */
             return 0;
         }
-        return FileWrapper.read(fd, buffer, offset, count);
+        return FileSystemIo.read(fd, buffer, offset, count);
     }
 
     /**
@@ -709,7 +709,7 @@
     {
         if (pointer.isNull())
             throw new NullPointerException();
-        return FileWrapper.read(fd, pointer, 0L, pointer.sizeof());
+        return FileSystemIo.read(fd, pointer, 0L, pointer.sizeof());
     }
 
     /**
@@ -759,7 +759,7 @@
              */
             return 0L;
         }
-        return FileWrapper.read(fd, pointer, offset, count);
+        return FileSystemIo.read(fd, pointer, offset, count);
     }
 
     /**
@@ -786,7 +786,7 @@
     public int read(ByteBuffer buffer)
         throws IOException
     {
-        return FileWrapper.read(fd, buffer, 0, buffer.capacity());
+        return FileSystemIo.read(fd, buffer, 0, buffer.capacity());
     }
 
     /**
@@ -831,7 +831,7 @@
              */
             return 0;
         }
-        return FileWrapper.read(fd, buffer, offset, count);
+        return FileSystemIo.read(fd, buffer, offset, count);
     }
 
     /**
@@ -856,7 +856,7 @@
     public int write(int b)
         throws IOException
     {
-        return FileWrapper.write(fd, b);
+        return FileSystemIo.write(fd, b);
     }
 
     /**
@@ -883,7 +883,7 @@
         if (buffer.length == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, buffer, 0, buffer.length);
+        return FileSystemIo.write(fd, buffer, 0, buffer.length);
     }
 
     /**
@@ -922,7 +922,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, buffer, offset, count);
+        return FileSystemIo.write(fd, buffer, offset, count);
     }
 
     /**
@@ -950,7 +950,7 @@
     {
         if (pointer.isNull())
             throw new NullPointerException();
-        return FileWrapper.write(fd, pointer, 0L, pointer.sizeof());
+        return FileSystemIo.write(fd, pointer, 0L, pointer.sizeof());
     }
 
     /**
@@ -993,7 +993,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, pointer, offset, count);
+        return FileSystemIo.write(fd, pointer, offset, count);
     }
 
     /**
@@ -1017,7 +1017,7 @@
     public int write(ByteBuffer buffer)
         throws IOException
     {
-        return FileWrapper.write(fd, buffer, 0, buffer.capacity());
+        return FileSystemIo.write(fd, buffer, 0, buffer.capacity());
     }
 
     /**
@@ -1056,7 +1056,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, buffer, offset, count);
+        return FileSystemIo.write(fd, buffer, offset, count);
     }
 
     /**
@@ -1094,7 +1094,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, array, offset, count);
+        return FileSystemIo.write(fd, array, offset, count);
     }
 
 
@@ -1132,7 +1132,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.write(fd, array, offset, count);
+        return FileSystemIo.write(fd, array, offset, count);
     }
 
 
@@ -1174,7 +1174,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.writeFully(fd, buffer, offset, count);
+        return FileSystemIo.writeFully(fd, buffer, offset, count);
     }
 
     /**
@@ -1196,7 +1196,7 @@
     public int writeFully(ByteBuffer buffer)
         throws IOException
     {
-        return FileWrapper.write(fd, buffer, 0, buffer.capacity());
+        return FileSystemIo.write(fd, buffer, 0, buffer.capacity());
     }
 
     /**
@@ -1237,7 +1237,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.writeFully(fd, buffer, offset, count);
+        return FileSystemIo.writeFully(fd, buffer, offset, count);
     }
 
 
@@ -1266,7 +1266,7 @@
     {
         if (pointer.isNull())
             throw new NullPointerException();
-        return FileWrapper.write(fd, pointer, 0L, pointer.sizeof());
+        return FileSystemIo.write(fd, pointer, 0L, pointer.sizeof());
     }
 
     /**
@@ -1308,7 +1308,7 @@
         if (count == 0) {
             return 0;
         }
-        return FileWrapper.writeFully(fd, pointer, offset, count);
+        return FileSystemIo.writeFully(fd, pointer, offset, count);
     }
 
 }

Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java (from r881730, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileWrapper.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileWrapper.java&r1=881730&r2=881741&rev=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileWrapper.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/io/FileSystemIo.java Wed Nov 18 12:10:10 2009
@@ -28,16 +28,16 @@
 import java.util.EnumSet;
 
 /**
- * File wrapper class.
+ * File sytem wrapper class.
  * <p>
- * Apache Commons Runtime {@code FileWrapper} provides static
+ * Apache Commons Runtime {@code FileSystemIo} provides static
  * method API for native file portable layer.
  * </p>
  */
-class FileWrapper
+class FileSystemIo
 {
 
-    protected FileWrapper()
+    protected FileSystemIo()
     {
         // Nothing.
     }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/finfo.c Wed Nov 18 12:10:10 2009
@@ -371,9 +371,9 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, stat0)(ACR_JNISTDARGS,
-                                                   jint fd,
-                                                   jboolean full)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, stat0)(ACR_JNISTDARGS,
+                                                    jint fd,
+                                                    jboolean full)
 {
     return  _stat1(_E, fd, full);
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/fsysio.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/fsysio.c?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/fsysio.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/fsysio.c Wed Nov 18 12:10:10 2009
@@ -269,9 +269,9 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open0)(ACR_JNISTDARGS,
-                                                   jstring fname,
-                                                   jint flags)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open0)(ACR_JNISTDARGS,
+                                                    jstring fname,
+                                                    jint flags)
 {
     int rc = 0;
     jobject fdo = NULL;
@@ -291,10 +291,10 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open1)(ACR_JNISTDARGS,
-                                                   jstring fname,
-                                                   jint flags,
-                                                   jint prot)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open1)(ACR_JNISTDARGS,
+                                                    jstring fname,
+                                                    jint flags,
+                                                    jint prot)
 {
     int rc = 0;
     jobject fdo = NULL;
@@ -314,9 +314,9 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open2)(ACR_JNISTDARGS,
-                                                   jint which,
-                                                   jint flags)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open2)(ACR_JNISTDARGS,
+                                                    jint which,
+                                                    jint flags)
 {
     int rc =  0;
     int fd = -1;
@@ -375,11 +375,11 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, mktemp0)(ACR_JNISTDARGS,
-                                                     jstring path,
-                                                     jstring prefix,
-                                                     jstring sufix,
-                                                     jboolean preserve)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, mktemp0)(ACR_JNISTDARGS,
+                                                      jstring path,
+                                                      jstring prefix,
+                                                      jstring sufix,
+                                                      jboolean preserve)
 {
     int rc =  0;
     int fo;
@@ -469,9 +469,9 @@
         return errno;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, lock0)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jint type)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, lock0)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jint type)
 {
     int rc;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -534,11 +534,11 @@
     return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, lock1)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jint type,
-                                                jlong off,
-                                                jlong len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, lock1)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jint type,
+                                                 jlong off,
+                                                 jlong len)
 {
     int rc;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -601,8 +601,7 @@
     return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, unlock0)(ACR_JNISTDARGS,
-                                                  jint file)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, unlock0)(ACR_JNISTDARGS, jint file)
 {
     int rc;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -644,10 +643,10 @@
     return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, unlock1)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, unlock1)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jlong off,
+                                                   jlong len)
 {
     int rc;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -689,10 +688,10 @@
     return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, seek0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jint where,
-                                                 jlong off)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, seek0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jint where,
+                                                  jlong off)
 {
     acr_off_t rc;
     acr_off_t os = (acr_off_t)off;
@@ -729,9 +728,9 @@
     return (jlong)rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, trunc0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jlong off)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, trunc0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jlong off)
 {
     acr_off_t os  = (acr_off_t)off;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -748,8 +747,8 @@
         return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read0)(ACR_JNISTDARGS,
-                                                jint file)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read0)(ACR_JNISTDARGS,
+                                                 jint file)
 {
     unsigned char c;
     ssize_t rd;
@@ -803,11 +802,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read1)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jbyteArray buf,
-                                                jint off,
-                                                jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read1)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jbyteArray buf,
+                                                 jint off,
+                                                 jint len)
 {
     jbyte  *bb = NULL;
     jbyte  *bc = NULL;
@@ -893,11 +892,11 @@
 
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, read2)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject ptr,
-                                                 jlong off,
-                                                 jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, read2)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject ptr,
+                                                  jlong off,
+                                                  jlong len)
 {
     size_t  pl;
     size_t  po = (size_t)off;
@@ -960,11 +959,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read3)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jobject dbb,
-                                                jint off,
-                                                jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read3)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jobject dbb,
+                                                 jint off,
+                                                 jint len)
 {
 #if defined(_DEBUG)
     size_t  pl;
@@ -1032,9 +1031,9 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jint b)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jint b)
 {
     unsigned char c = (unsigned char)(b & 0xFF);
     ssize_t wr;
@@ -1080,11 +1079,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write1)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jbyteArray buf,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write1)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jbyteArray buf,
+                                                  jint off,
+                                                  jint len)
 {
     jbyte  *bb;
     size_t  po = (size_t)off;
@@ -1138,11 +1137,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write2)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobject ptr,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write2)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobject ptr,
+                                                   jlong off,
+                                                   jlong len)
 {
     size_t  pl;
     size_t  po = (size_t)off;
@@ -1200,11 +1199,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write3)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject dbb,
-                                                 jlong off,
-                                                 jlong len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write3)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject dbb,
+                                                  jlong off,
+                                                  jlong len)
 {
 #if defined(_DEBUG)
     size_t  pl;
@@ -1268,11 +1267,11 @@
 }
 
 #define ACR_IOVEC_ON_STACK 32
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write4)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobjectArray vec,
-                                                  jint off,
-                                                  jint len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write4)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobjectArray vec,
+                                                   jint off,
+                                                   jint len)
 {
     size_t   i;
     size_t  pl;
@@ -1363,11 +1362,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write5)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobjectArray vec,
-                                                  jint off,
-                                                  jint len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write5)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobjectArray vec,
+                                                   jint off,
+                                                   jint len)
 {
     size_t   i;
     size_t  pl;
@@ -1442,11 +1441,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, fullw0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jbyteArray buf,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, fullw0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jbyteArray buf,
+                                                  jint off,
+                                                  jint len)
 {
     jbyte  *bb;
     jbyte  *wb;
@@ -1510,11 +1509,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, fullw1)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobject ptr,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, fullw1)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobject ptr,
+                                                   jlong off,
+                                                   jlong len)
 {
     size_t  pl;
     size_t  po = (size_t)off;
@@ -1582,11 +1581,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, fullw2)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject dbb,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, fullw2)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject dbb,
+                                                  jint off,
+                                                  jint len)
 {
 #if defined(_DEBUG)
     size_t  pl;

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/finfo.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/finfo.c?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/finfo.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/finfo.c Wed Nov 18 12:10:10 2009
@@ -502,9 +502,9 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, stat0)(ACR_JNISTDARGS,
-                                                   jint fd,
-                                                   jboolean full)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, stat0)(ACR_JNISTDARGS,
+                                                    jint fd,
+                                                    jboolean full)
 {
     return  _stat1(_E, fd, full);
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/fsysio.c Wed Nov 18 12:10:10 2009
@@ -277,9 +277,9 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open0)(ACR_JNISTDARGS,
-                                                   jstring fname,
-                                                   jint flags)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open0)(ACR_JNISTDARGS,
+                                                    jstring fname,
+                                                    jint flags)
 {
     int rc = 0;
     jobject fdo = NULL;
@@ -299,10 +299,10 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open1)(ACR_JNISTDARGS,
-                                                   jstring fname,
-                                                   jint flags,
-                                                   jint prot)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open1)(ACR_JNISTDARGS,
+                                                    jstring fname,
+                                                    jint flags,
+                                                    jint prot)
 {
     int rc = 0;
     jobject fdo = NULL;
@@ -322,9 +322,9 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, open2)(ACR_JNISTDARGS,
-                                                   jint which,
-                                                   jint flags)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, open2)(ACR_JNISTDARGS,
+                                                    jint which,
+                                                    jint flags)
 {
     DWORD  rc =  0;
     HANDLE fd = INVALID_HANDLE_VALUE;
@@ -395,11 +395,11 @@
     return fdo;
 }
 
-ACR_IO_EXPORT_DECLARE(jobject, FileWrapper, mktemp0)(ACR_JNISTDARGS,
-                                                     jstring path,
-                                                     jstring prefix,
-                                                     jstring sufix,
-                                                     jboolean preserve)
+ACR_IO_EXPORT_DECLARE(jobject, FileSystemIo, mktemp0)(ACR_JNISTDARGS,
+                                                      jstring path,
+                                                      jstring prefix,
+                                                      jstring sufix,
+                                                      jboolean preserve)
 {
     int rc =  0;
     int fo;
@@ -495,9 +495,9 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, lock0)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jint type)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, lock0)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jint type)
 {
     DWORD flags = 0;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -515,11 +515,11 @@
     return do_lock(f, flags);
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, lock1)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jint type,
-                                                jlong off,
-                                                jlong len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, lock1)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jint type,
+                                                 jlong off,
+                                                 jlong len)
 {
     LARGE_INTEGER lii;
     DWORD flags = 0;
@@ -582,8 +582,8 @@
         return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, unlock0)(ACR_JNISTDARGS,
-                                                  jint file)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, unlock0)(ACR_JNISTDARGS,
+                                                   jint file)
 {
     OVERLAPPED  opp;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -600,10 +600,10 @@
         return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, unlock1)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, unlock1)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jlong off,
+                                                   jlong len)
 {
     LARGE_INTEGER lii;
     OVERLAPPED    opp;
@@ -624,7 +624,7 @@
         return 0;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, seek0)(ACR_JNISTDARGS,
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, seek0)(ACR_JNISTDARGS,
                                                  jint file,
                                                  jint where,
                                                  jlong off)
@@ -667,9 +667,9 @@
     return (jlong)f->pos;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, trunc0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jlong off)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, trunc0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jlong off)
 {
     LARGE_INTEGER os;
     acr_file_t *f = (acr_file_t *)ACR_IOH_FDATA(file);
@@ -794,8 +794,8 @@
     return rc;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read0)(ACR_JNISTDARGS,
-                                                jint file)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read0)(ACR_JNISTDARGS,
+                                                 jint file)
 {
     unsigned char c;
     DWORD rd = 0;
@@ -904,11 +904,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read1)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jbyteArray buf,
-                                                jint off,
-                                                jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read1)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jbyteArray buf,
+                                                 jint off,
+                                                 jint len)
 {
     jbyte  *bb = NULL;
     jbyte  *bc = NULL;
@@ -1060,11 +1060,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, read2)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject ptr,
-                                                 jlong off,
-                                                 jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, read2)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject ptr,
+                                                  jlong off,
+                                                  jlong len)
 {
     size_t  pl;
     DWORD   po = (DWORD)off;
@@ -1194,11 +1194,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, read3)(ACR_JNISTDARGS,
-                                                jint file,
-                                                jobject dbb,
-                                                jint off,
-                                                jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, read3)(ACR_JNISTDARGS,
+                                                 jint file,
+                                                 jobject dbb,
+                                                 jint off,
+                                                 jint len)
 {
 #if defined(_DEBUG)
     DWORD   pl;
@@ -1332,9 +1332,9 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jint b)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jint b)
 {
     unsigned char c = (unsigned char)(b & 0xFF);
     DWORD rc   = 0;
@@ -1435,11 +1435,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write1)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jbyteArray buf,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write1)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jbyteArray buf,
+                                                  jint off,
+                                                  jint len)
 {
     jbyte  *bb;
     DWORD   rc = 0;
@@ -1551,11 +1551,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write2)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobject ptr,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write2)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobject ptr,
+                                                   jlong off,
+                                                   jlong len)
 {
     size_t  pl;
     jbyte  *pb;
@@ -1673,11 +1673,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, write3)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject dbb,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, write3)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject dbb,
+                                                  jint off,
+                                                  jint len)
 {
 #if defined(_DEBUG)
     DWORD   pl;
@@ -1799,11 +1799,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write4)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobjectArray vec,
-                                                  jint off,
-                                                  jint len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write4)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobjectArray vec,
+                                                   jint off,
+                                                   jint len)
 {
     DWORD   i;
     DWORD   pl;
@@ -1928,11 +1928,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, write5)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobjectArray vec,
-                                                  jint off,
-                                                  jint len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, write5)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobjectArray vec,
+                                                   jint off,
+                                                   jint len)
 {
     DWORD   i;
     DWORD   pl;
@@ -2058,11 +2058,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, fullw0)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jbyteArray buf,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, fullw0)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jbyteArray buf,
+                                                  jint off,
+                                                  jint len)
 {
     jbyte  *bb;
     jbyte  *wb;
@@ -2187,11 +2187,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jlong, FileWrapper, fullw1)(ACR_JNISTDARGS,
-                                                  jint file,
-                                                  jobject ptr,
-                                                  jlong off,
-                                                  jlong len)
+ACR_IO_EXPORT_DECLARE(jlong, FileSystemIo, fullw1)(ACR_JNISTDARGS,
+                                                   jint file,
+                                                   jobject ptr,
+                                                   jlong off,
+                                                   jlong len)
 {
     size_t  pl;
     jbyte  *pb;
@@ -2320,11 +2320,11 @@
     return -1;
 }
 
-ACR_IO_EXPORT_DECLARE(jint, FileWrapper, fullw2)(ACR_JNISTDARGS,
-                                                 jint file,
-                                                 jobject dbb,
-                                                 jint off,
-                                                 jint len)
+ACR_IO_EXPORT_DECLARE(jint, FileSystemIo, fullw2)(ACR_JNISTDARGS,
+                                                  jint file,
+                                                  jobject dbb,
+                                                  jint off,
+                                                  jint len)
 {
 #if defined(_DEBUG)
     DWORD   pl;

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java?rev=881741&r1=881740&r2=881741&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java Wed Nov 18 12:10:10 2009
@@ -726,6 +726,8 @@
         }
         public int testCallback(Object o, int num)
         {
+
+            int r = 0;
             int i;
             int [] fd = new int[100];
             try {
@@ -735,9 +737,15 @@
             } catch (Exception e) {
                 // Ignore
             }
-            for (i = 0; i < 100; i++)
-                test053(fd[i]);
-            synchronized (this) {
+            for (i = 0; i < 100; i++) {
+                if (fd[i] < 1)
+                    r = 1;
+                else
+                    test053(fd[i]);
+            }
+            if (r != 0)
+                return 1;
+            synchronized (o) {
                ((IohParallelWorker)o).numCalls++;
             }
             for (i = 0; i < 100; i++) {



Mime
View raw message